reformat code

This commit is contained in:
badaix 2019-09-25 19:07:23 +02:00
parent 8b231c7cc6
commit 6b729ad61c
19 changed files with 23 additions and 35 deletions

View file

@ -179,8 +179,8 @@ bool BrowseAvahi::browse(const std::string& serviceName, mDNSResult& result, int
throw SnapException("BrowseAvahi - Failed to create client: " + std::string(avahi_strerror(error)));
/* Create the service browser */
if (!(sb_ =
avahi_service_browser_new(client_, AVAHI_IF_UNSPEC, AVAHI_PROTO_INET, serviceName.c_str(), nullptr, (AvahiLookupFlags)0, browse_callback, this)))
if (!(sb_ = avahi_service_browser_new(client_, AVAHI_IF_UNSPEC, AVAHI_PROTO_INET, serviceName.c_str(), nullptr, (AvahiLookupFlags)0, browse_callback,
this)))
throw SnapException("BrowseAvahi - Failed to create service browser: " + std::string(avahi_strerror(avahi_client_errno(client_))));
result_.valid = false;

View file

@ -28,7 +28,8 @@ class Decoder
{
public:
Decoder(){};
virtual ~Decoder()= default;;
virtual ~Decoder() = default;
virtual bool decode(msg::PcmChunk* chunk) = 0;
virtual SampleFormat setHeader(msg::CodecHeader* chunk) = 0;

View file

@ -105,7 +105,8 @@ SampleFormat FlacDecoder::setHeader(msg::CodecHeader* chunk)
throw SnapException("ERROR: allocating decoder");
// (void)FLAC__stream_decoder_set_md5_checking(decoder, true);
init_status = FLAC__stream_decoder_init_stream(decoder, read_callback, nullptr, nullptr, nullptr, nullptr, write_callback, metadata_callback, error_callback, this);
init_status =
FLAC__stream_decoder_init_stream(decoder, read_callback, nullptr, nullptr, nullptr, nullptr, write_callback, metadata_callback, error_callback, this);
if (init_status != FLAC__STREAM_DECODER_INIT_STATUS_OK)
throw SnapException("ERROR: initializing decoder: " + string(FLAC__StreamDecoderInitStatusString[init_status]));

View file

@ -48,8 +48,7 @@ public:
msg["SnapStreamProtocolVersion"] = 2;
}
~Hello() override
= default;
~Hello() override = default;
std::string getMacAddress() const
{

View file

@ -36,8 +36,7 @@ public:
{
}
~JsonMessage() override
= default;
~JsonMessage() override = default;
void read(std::istream& stream) override
{

View file

@ -126,8 +126,7 @@ struct BaseMessage
{
}
virtual ~BaseMessage()
= default;
virtual ~BaseMessage() = default;
virtual void read(std::istream& stream)
{

View file

@ -48,8 +48,7 @@ public:
{
}
~PcmChunk() override
= default;
~PcmChunk() override = default;
int readFrames(void* outputBuffer, size_t frameCount)
{

View file

@ -36,8 +36,7 @@ public:
setMuted(false);
}
~ServerSettings() override
= default;
~ServerSettings() override = default;
int32_t getBufferMs()
{

View file

@ -65,8 +65,7 @@ public:
{
}
~StreamTags() override
= default;
~StreamTags() override = default;
};
}

View file

@ -31,8 +31,7 @@ public:
{
}
~Time() override
= default;
~Time() override = default;
void read(std::istream& stream) override
{

View file

@ -30,8 +30,7 @@
using namespace std;
SampleFormat::SampleFormat()
= default;
SampleFormat::SampleFormat() = default;
SampleFormat::SampleFormat(const std::string& format)

View file

@ -72,8 +72,7 @@ public:
}
~AsyncSnapException() throw() override
= default;
~AsyncSnapException() throw() override = default;
};

View file

@ -160,8 +160,7 @@ struct Snapcast
{
}
virtual ~Snapcast()
= default;
virtual ~Snapcast() = default;
virtual void fromJson(const json& j)
{

View file

@ -54,8 +54,7 @@ public:
{
}
virtual ~Encoder()
= default;
virtual ~Encoder() = default;
/// The listener will receive the encoded stream
virtual void init(EncoderListener* listener, const SampleFormat& format)

View file

@ -149,8 +149,8 @@ void PublishAvahi::create_services(AvahiClient* c)
/// We will now add two services and one subtype to the entry group
for (const auto& service : services_)
{
if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AvahiPublishFlags(0), name, service.name_.c_str(), nullptr, nullptr,
service.port_, NULL)) < 0)
if ((ret = avahi_entry_group_add_service(group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, AvahiPublishFlags(0), name, service.name_.c_str(), nullptr,
nullptr, service.port_, NULL)) < 0)
{
if (ret == AVAHI_ERR_COLLISION)
goto collision;

View file

@ -23,8 +23,7 @@ public:
{
}
virtual ~PublishmDNS()
= default;
virtual ~PublishmDNS() = default;
virtual void publish(const std::vector<mDNSService>& services) = 0;

View file

@ -35,8 +35,7 @@ StreamServer::StreamServer(asio::io_service* io_service, const StreamServerSetti
}
StreamServer::~StreamServer()
= default;
StreamServer::~StreamServer() = default;
void StreamServer::onMetaChanged(const PcmStream* pcmStream)

View file

@ -63,8 +63,7 @@ SpotifyStream::SpotifyStream(PcmListener* pcmListener, const StreamUri& uri) : P
}
SpotifyStream::~SpotifyStream()
= default;
SpotifyStream::~SpotifyStream() = default;
void SpotifyStream::initExeAndPath(const std::string& filename)