Commit bc6eca21 authored by Max Kellermann's avatar Max Kellermann

*: add `explicit`

parent 72ec641f
......@@ -62,7 +62,7 @@ class Iso9660ArchiveFile final : public ArchiveFile {
std::shared_ptr<Iso9660> iso;
public:
Iso9660ArchiveFile(std::shared_ptr<Iso9660> &&_iso)
explicit Iso9660ArchiveFile(std::shared_ptr<Iso9660> &&_iso)
:iso(std::move(_iso)) {}
/**
......
......@@ -54,7 +54,7 @@ class ZzipArchiveFile final : public ArchiveFile {
std::shared_ptr<ZzipDir> dir;
public:
ZzipArchiveFile(std::shared_ptr<ZzipDir> &&_dir)
explicit ZzipArchiveFile(std::shared_ptr<ZzipDir> &&_dir)
:dir(std::move(_dir)) {}
void Visit(ArchiveVisitor &visitor) override;
......
......@@ -111,7 +111,7 @@ class UPnPDirParser final : public CommonExpatParser {
TagBuilder tag;
public:
UPnPDirParser(UPnPDirContent &_directory)
explicit UPnPDirParser(UPnPDirContent &_directory)
:directory(_directory),
state(NONE),
tag_type(TAG_NUM_OF_ITEM_TYPES)
......
......@@ -82,7 +82,7 @@ class PreparedFlacEncoder final : public PreparedEncoder {
const unsigned compression;
public:
PreparedFlacEncoder(const ConfigBlock &block);
explicit PreparedFlacEncoder(const ConfigBlock &block);
/* virtual methods from class PreparedEncoder */
Encoder *Open(AudioFormat &audio_format) override;
......
......@@ -57,7 +57,7 @@ class PreparedLameEncoder final : public PreparedEncoder {
int bitrate;
public:
PreparedLameEncoder(const ConfigBlock &block);
explicit PreparedLameEncoder(const ConfigBlock &block);
/* virtual methods from class PreparedEncoder */
Encoder *Open(AudioFormat &audio_format) override;
......
......@@ -79,7 +79,7 @@ class PreparedOpusEncoder final : public PreparedEncoder {
const bool chaining;
public:
PreparedOpusEncoder(const ConfigBlock &block);
explicit PreparedOpusEncoder(const ConfigBlock &block);
/* virtual methods from class PreparedEncoder */
Encoder *Open(AudioFormat &audio_format) override;
......
......@@ -86,7 +86,7 @@ class PreparedShineEncoder final : public PreparedEncoder {
shine_config_t config;
public:
PreparedShineEncoder(const ConfigBlock &block);
explicit PreparedShineEncoder(const ConfigBlock &block);
/* virtual methods from class PreparedEncoder */
Encoder *Open(AudioFormat &audio_format) override;
......
......@@ -73,7 +73,7 @@ class PreparedTwolameEncoder final : public PreparedEncoder {
int bitrate;
public:
PreparedTwolameEncoder(const ConfigBlock &block);
explicit PreparedTwolameEncoder(const ConfigBlock &block);
/* virtual methods from class PreparedEncoder */
Encoder *Open(AudioFormat &audio_format) override;
......
......@@ -65,7 +65,7 @@ class PreparedVorbisEncoder final : public PreparedEncoder {
int bitrate;
public:
PreparedVorbisEncoder(const ConfigBlock &block);
explicit PreparedVorbisEncoder(const ConfigBlock &block);
/* virtual methods from class PreparedEncoder */
Encoder *Open(AudioFormat &audio_format) override;
......
......@@ -33,7 +33,7 @@ class WaveEncoder final : public Encoder {
DynamicFifoBuffer<uint8_t> buffer;
public:
WaveEncoder(AudioFormat &audio_format) noexcept;
explicit WaveEncoder(AudioFormat &audio_format) noexcept;
/* virtual methods from class Encoder */
void Write(const void *data, size_t length) override;
......
......@@ -53,7 +53,7 @@ class SignalMonitor final : private SocketMonitor {
#endif
public:
SignalMonitor(EventLoop &_loop)
explicit SignalMonitor(EventLoop &_loop)
:SocketMonitor(_loop) {
#ifndef USE_SIGNALFD
SocketMonitor::Open(SocketDescriptor(fd.Get()));
......
......@@ -64,7 +64,7 @@ class PreparedAutoConvertFilter final : public PreparedFilter {
std::unique_ptr<PreparedFilter> filter;
public:
PreparedAutoConvertFilter(std::unique_ptr<PreparedFilter> _filter) noexcept
explicit PreparedAutoConvertFilter(std::unique_ptr<PreparedFilter> _filter) noexcept
:filter(std::move(_filter)) {}
std::unique_ptr<Filter> Open(AudioFormat &af) override;
......
......@@ -42,7 +42,7 @@ class ConvertFilter final : public Filter {
std::unique_ptr<PcmConvert> state;
public:
ConvertFilter(const AudioFormat &audio_format);
explicit ConvertFilter(const AudioFormat &audio_format);
void Set(const AudioFormat &_out_audio_format);
......
......@@ -34,7 +34,7 @@ class NormalizeFilter final : public Filter {
PcmBuffer buffer;
public:
NormalizeFilter(const AudioFormat &audio_format)
explicit NormalizeFilter(const AudioFormat &audio_format)
:Filter(audio_format), compressor(Compressor_new(0)) {
}
......
......@@ -130,7 +130,7 @@ public:
* @param block the configuration block to read
* @param filter a route_filter whose min_channels and sources[] to set
*/
PreparedRouteFilter(const ConfigBlock &block);
explicit PreparedRouteFilter(const ConfigBlock &block);
/* virtual methods from class PreparedFilter */
std::unique_ptr<Filter> Open(AudioFormat &af) override;
......
......@@ -139,7 +139,7 @@ class AlsaInputStream::SourceSpec {
DivideString components;
public:
SourceSpec(const char *_uri)
explicit SourceSpec(const char *_uri)
: uri(_uri)
, components(uri, '?')
{
......
......@@ -40,7 +40,7 @@ class UPnPDeviceParser final : public CommonExpatParser {
UPnPService m_tservice;
public:
UPnPDeviceParser(UPnPDevice& device)
explicit UPnPDeviceParser(UPnPDevice& device)
:m_device(device),
value(nullptr) {}
......
......@@ -26,7 +26,7 @@ class NullMixer final : public Mixer {
unsigned volume;
public:
NullMixer(MixerListener &_listener)
explicit NullMixer(MixerListener &_listener)
:Mixer(null_mixer_plugin, _listener),
volume(100)
{
......
......@@ -34,7 +34,7 @@ class SoftwareMixer final : public Mixer {
unsigned volume = 100;
public:
SoftwareMixer(MixerListener &_listener)
explicit SoftwareMixer(MixerListener &_listener)
:Mixer(software_mixer_plugin, _listener)
{
}
......
......@@ -66,7 +66,7 @@ class SmbclientNeighborExplorer final : public NeighborExplorer {
bool quit;
public:
SmbclientNeighborExplorer(NeighborListener &_listener) noexcept
explicit SmbclientNeighborExplorer(NeighborListener &_listener) noexcept
:NeighborExplorer(_listener),
thread(BIND_THIS_METHOD(ThreadFunc)) {}
......
......@@ -52,7 +52,7 @@ class AoOutput final : AudioOutput, SafeSingleton<AoInit> {
size_t frame_size;
AoOutput(const ConfigBlock &block);
explicit AoOutput(const ConfigBlock &block);
~AoOutput() override;
public:
......
......@@ -42,7 +42,7 @@ class FifoOutput final : AudioOutput {
Timer *timer;
public:
FifoOutput(const ConfigBlock &block);
explicit FifoOutput(const ConfigBlock &block);
~FifoOutput() override {
CloseFifo();
......
......@@ -27,7 +27,7 @@ class NullOutput final : AudioOutput {
Timer *timer;
public:
NullOutput(const ConfigBlock &block)
explicit NullOutput(const ConfigBlock &block)
:AudioOutput(0),
sync(block.GetBlockValue("sync", true)) {}
......
......@@ -44,7 +44,7 @@ class OpenALOutput final : AudioOutput {
ALenum format;
ALuint frequency;
OpenALOutput(const ConfigBlock &block);
explicit OpenALOutput(const ConfigBlock &block);
public:
static AudioOutput *Create(EventLoop &,
......
......@@ -30,7 +30,7 @@ class PipeOutput final : AudioOutput {
const std::string cmd;
FILE *fh;
PipeOutput(const ConfigBlock &block);
explicit PipeOutput(const ConfigBlock &block);
public:
static AudioOutput *Create(EventLoop &,
......
......@@ -67,7 +67,7 @@ class RecorderOutput final : AudioOutput {
*/
FileOutputStream *file;
RecorderOutput(const ConfigBlock &block);
explicit RecorderOutput(const ConfigBlock &block);
public:
static AudioOutput *Create(EventLoop &, const ConfigBlock &block) {
......
......@@ -53,7 +53,7 @@ struct Convert24To16 {
PcmDither &dither;
Convert24To16(PcmDither &_dither):dither(_dither) {}
explicit Convert24To16(PcmDither &_dither):dither(_dither) {}
void Convert(int16_t *out, const int32_t *in, size_t n) {
dither.Dither24To16(out, in, in + n);
......@@ -66,7 +66,7 @@ struct Convert32To16 {
PcmDither &dither;
Convert32To16(PcmDither &_dither):dither(_dither) {}
explicit Convert32To16(PcmDither &_dither):dither(_dither) {}
void Convert(int16_t *out, const int32_t *in, size_t n) {
dither.Dither32To16(out, in, in + n);
......
......@@ -28,7 +28,7 @@ class CuePlaylist final : public SongEnumerator {
CueParser parser;
public:
CuePlaylist(InputStreamPtr &&is)
explicit CuePlaylist(InputStreamPtr &&is)
:tis(std::move(is)) {
}
......
......@@ -35,7 +35,7 @@ class ExtM3uPlaylist final : public SongEnumerator {
TextInputStream tis;
public:
ExtM3uPlaylist(InputStreamPtr &&is)
explicit ExtM3uPlaylist(InputStreamPtr &&is)
:tis(std::move(is)) {
}
......
......@@ -28,7 +28,7 @@ class M3uPlaylist final : public SongEnumerator {
TextInputStream tis;
public:
M3uPlaylist(InputStreamPtr &&is)
explicit M3uPlaylist(InputStreamPtr &&is)
:tis(std::move(is)) {
}
......
......@@ -36,7 +36,7 @@ class LocalDirectoryReader final : public StorageDirectoryReader {
std::string name_utf8;
public:
LocalDirectoryReader(AllocatedPath &&_base_fs)
explicit LocalDirectoryReader(AllocatedPath &&_base_fs)
:base_fs(std::move(_base_fs)), reader(base_fs) {}
/* virtual methods from class StorageDirectoryReader */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment