diff options
-rw-r--r-- | src/ApeTag.hxx | 2 | ||||
-rw-r--r-- | src/ClientFile.hxx | 2 | ||||
-rw-r--r-- | src/ConfigData.hxx | 2 | ||||
-rw-r--r-- | src/DecoderPlugin.hxx | 19 | ||||
-rw-r--r-- | src/Directory.hxx | 1 | ||||
-rw-r--r-- | src/Listen.hxx | 2 | ||||
-rw-r--r-- | src/Log.hxx | 1 | ||||
-rw-r--r-- | src/MixerPlugin.hxx | 2 | ||||
-rw-r--r-- | src/OutputAll.hxx | 3 | ||||
-rw-r--r-- | src/OutputPlugin.hxx | 1 | ||||
-rw-r--r-- | src/Permission.cxx | 1 | ||||
-rw-r--r-- | src/Playlist.hxx | 2 | ||||
-rw-r--r-- | src/Song.hxx | 2 | ||||
-rw-r--r-- | src/TagFile.hxx | 2 | ||||
-rw-r--r-- | src/TagId3.hxx | 2 | ||||
-rw-r--r-- | src/TagRva2.hxx | 2 | ||||
-rw-r--r-- | src/decoder/VorbisComments.hxx | 2 | ||||
-rw-r--r-- | src/output/PulseOutputPlugin.hxx | 2 | ||||
-rw-r--r-- | src/pcm/PcmResample.hxx | 1 | ||||
-rw-r--r-- | src/pcm/PcmVolume.hxx | 1 | ||||
-rw-r--r-- | src/protocol/ArgParser.hxx | 1 | ||||
-rw-r--r-- | src/util/Tokenizer.cxx | 1 |
22 files changed, 8 insertions, 46 deletions
diff --git a/src/ApeTag.hxx b/src/ApeTag.hxx index 96b53612b..1a7143314 100644 --- a/src/ApeTag.hxx +++ b/src/ApeTag.hxx @@ -22,8 +22,6 @@ #include "TagTable.hxx" -#include <stdbool.h> - struct tag_handler; extern const struct tag_table ape_tags[]; diff --git a/src/ClientFile.hxx b/src/ClientFile.hxx index c2ea25f51..21db4d3ad 100644 --- a/src/ClientFile.hxx +++ b/src/ClientFile.hxx @@ -22,8 +22,6 @@ #include "gerror.h" -#include <stdbool.h> - class Client; class Path; diff --git a/src/ConfigData.hxx b/src/ConfigData.hxx index f3e661b2b..b5ec30efd 100644 --- a/src/ConfigData.hxx +++ b/src/ConfigData.hxx @@ -30,8 +30,6 @@ #include <vector> #endif -#include <stdbool.h> - #ifdef __cplusplus struct block_param { diff --git a/src/DecoderPlugin.hxx b/src/DecoderPlugin.hxx index 271595b71..37e0d28d7 100644 --- a/src/DecoderPlugin.hxx +++ b/src/DecoderPlugin.hxx @@ -20,9 +20,6 @@ #ifndef MPD_DECODER_PLUGIN_HXX #define MPD_DECODER_PLUGIN_HXX -#include <stdbool.h> -#include <stddef.h> - struct config_param; struct input_stream; struct tag; @@ -40,7 +37,7 @@ struct decoder_plugin { /** * Initialize the decoder plugin. Optional method. * - * @param param a configuration block for this plugin, or NULL + * @param param a configuration block for this plugin, or nullptr * if none is configured * @return true if the plugin was initialized successfully, * false if the plugin is not available @@ -94,13 +91,13 @@ struct decoder_plugin { * @param const char* pathname full pathname for the file on fs * @param const unsigned int tnum track number * - * @return NULL if there are no multiple files + * @return nullptr if there are no multiple files * a filename for every single track according to tnum (param 2) * do not include full pathname here, just the "virtual" file */ char* (*container_scan)(const char *path_fs, const unsigned int tnum); - /* last element in these arrays must always be a NULL: */ + /* last element in these arrays must always be a nullptr: */ const char *const*suffixes; const char *const*mime_types; }; @@ -108,7 +105,7 @@ struct decoder_plugin { /** * Initialize a decoder plugin. * - * @param param a configuration block for this plugin, or NULL if none + * @param param a configuration block for this plugin, or nullptr if none * is configured * @return true if the plugin was initialized successfully, false if * the plugin is not available @@ -117,7 +114,7 @@ static inline bool decoder_plugin_init(const struct decoder_plugin *plugin, const struct config_param *param) { - return plugin->init != NULL + return plugin->init != nullptr ? plugin->init(param) : true; } @@ -128,7 +125,7 @@ decoder_plugin_init(const struct decoder_plugin *plugin, static inline void decoder_plugin_finish(const struct decoder_plugin *plugin) { - if (plugin->finish != NULL) + if (plugin->finish != nullptr) plugin->finish(); } @@ -160,7 +157,7 @@ decoder_plugin_scan_file(const struct decoder_plugin *plugin, const char *path_fs, const struct tag_handler *handler, void *handler_ctx) { - return plugin->scan_file != NULL + return plugin->scan_file != nullptr ? plugin->scan_file(path_fs, handler, handler_ctx) : false; } @@ -174,7 +171,7 @@ decoder_plugin_scan_stream(const struct decoder_plugin *plugin, const struct tag_handler *handler, void *handler_ctx) { - return plugin->scan_stream != NULL + return plugin->scan_stream != nullptr ? plugin->scan_stream(is, handler, handler_ctx) : false; } diff --git a/src/Directory.hxx b/src/Directory.hxx index 97e4ef32b..97a16f085 100644 --- a/src/Directory.hxx +++ b/src/Directory.hxx @@ -27,7 +27,6 @@ #include "PlaylistVector.hxx" #include "gerror.h" -#include <stdbool.h> #include <sys/types.h> #define DEVICE_INARCHIVE (dev_t)(-1) diff --git a/src/Listen.hxx b/src/Listen.hxx index fd553477b..3e2be9e63 100644 --- a/src/Listen.hxx +++ b/src/Listen.hxx @@ -22,8 +22,6 @@ #include "gerror.h" -#include <stdbool.h> - extern int listen_port; bool diff --git a/src/Log.hxx b/src/Log.hxx index cfcece104..1010721b5 100644 --- a/src/Log.hxx +++ b/src/Log.hxx @@ -21,7 +21,6 @@ #define MPD_LOG_HXX #include <glib.h> -#include <stdbool.h> G_GNUC_CONST static inline GQuark diff --git a/src/MixerPlugin.hxx b/src/MixerPlugin.hxx index cc57a76a9..a43c34fc4 100644 --- a/src/MixerPlugin.hxx +++ b/src/MixerPlugin.hxx @@ -29,8 +29,6 @@ #include "gerror.h" -#include <stdbool.h> - struct config_param; class Mixer; diff --git a/src/OutputAll.hxx b/src/OutputAll.hxx index becf4b695..0bb9f0763 100644 --- a/src/OutputAll.hxx +++ b/src/OutputAll.hxx @@ -29,9 +29,6 @@ #include "replay_gain_info.h" #include "gerror.h" -#include <stdbool.h> -#include <stddef.h> - struct audio_format; struct music_buffer; struct music_chunk; diff --git a/src/OutputPlugin.hxx b/src/OutputPlugin.hxx index 3839cd5b3..8bf34849d 100644 --- a/src/OutputPlugin.hxx +++ b/src/OutputPlugin.hxx @@ -23,7 +23,6 @@ #include "gcc.h" #include "gerror.h" -#include <stdbool.h> #include <stddef.h> struct config_param; diff --git a/src/Permission.cxx b/src/Permission.cxx index e6cf5cfb8..246047774 100644 --- a/src/Permission.cxx +++ b/src/Permission.cxx @@ -27,7 +27,6 @@ #include <glib.h> -#include <stdbool.h> #include <string.h> #define PERMISSION_PASSWORD_CHAR '@' diff --git a/src/Playlist.hxx b/src/Playlist.hxx index c640b78ed..a4594368e 100644 --- a/src/Playlist.hxx +++ b/src/Playlist.hxx @@ -23,8 +23,6 @@ #include "Queue.hxx" #include "playlist_error.h" -#include <stdbool.h> - struct player_control; struct Song; diff --git a/src/Song.hxx b/src/Song.hxx index f7ded6c04..30996ccda 100644 --- a/src/Song.hxx +++ b/src/Song.hxx @@ -24,8 +24,6 @@ #include "gcc.h" #include <assert.h> -#include <stddef.h> -#include <stdbool.h> #include <sys/time.h> #define SONG_FILE "file: " diff --git a/src/TagFile.hxx b/src/TagFile.hxx index 61f491854..910f7b82b 100644 --- a/src/TagFile.hxx +++ b/src/TagFile.hxx @@ -22,8 +22,6 @@ #include "check.h" -#include <stdbool.h> - struct tag_handler; /** diff --git a/src/TagId3.hxx b/src/TagId3.hxx index 271fc081f..00824a3e4 100644 --- a/src/TagId3.hxx +++ b/src/TagId3.hxx @@ -24,8 +24,6 @@ #include "gcc.h" #include "gerror.h" -#include <stdbool.h> - struct tag_handler; struct tag; diff --git a/src/TagRva2.hxx b/src/TagRva2.hxx index 057f03186..016a3585d 100644 --- a/src/TagRva2.hxx +++ b/src/TagRva2.hxx @@ -22,8 +22,6 @@ #include "check.h" -#include <stdbool.h> - struct id3_tag; struct replay_gain_info; diff --git a/src/decoder/VorbisComments.hxx b/src/decoder/VorbisComments.hxx index 8212cac47..2abb7c6a5 100644 --- a/src/decoder/VorbisComments.hxx +++ b/src/decoder/VorbisComments.hxx @@ -22,8 +22,6 @@ #include "check.h" -#include <stdbool.h> - struct replay_gain_info; struct tag_handler; diff --git a/src/output/PulseOutputPlugin.hxx b/src/output/PulseOutputPlugin.hxx index 26ee25a41..58dc6703c 100644 --- a/src/output/PulseOutputPlugin.hxx +++ b/src/output/PulseOutputPlugin.hxx @@ -22,8 +22,6 @@ #include "gerror.h" -#include <stdbool.h> - struct PulseOutput; struct PulseMixer; struct pa_cvolume; diff --git a/src/pcm/PcmResample.hxx b/src/pcm/PcmResample.hxx index 790055486..8699597c1 100644 --- a/src/pcm/PcmResample.hxx +++ b/src/pcm/PcmResample.hxx @@ -25,7 +25,6 @@ #include <stdint.h> #include <stddef.h> -#include <stdbool.h> #ifdef HAVE_LIBSAMPLERATE #include <samplerate.h> diff --git a/src/pcm/PcmVolume.hxx b/src/pcm/PcmVolume.hxx index d3e6a5536..ed660b22a 100644 --- a/src/pcm/PcmVolume.hxx +++ b/src/pcm/PcmVolume.hxx @@ -24,7 +24,6 @@ #include "audio_format.h" #include <stdint.h> -#include <stdbool.h> #include <stddef.h> enum { diff --git a/src/protocol/ArgParser.hxx b/src/protocol/ArgParser.hxx index b6feb3e67..f69248d2d 100644 --- a/src/protocol/ArgParser.hxx +++ b/src/protocol/ArgParser.hxx @@ -22,7 +22,6 @@ #include "check.h" -#include <stdbool.h> #include <stdint.h> class Client; diff --git a/src/util/Tokenizer.cxx b/src/util/Tokenizer.cxx index 2d6c2b434..37650483f 100644 --- a/src/util/Tokenizer.cxx +++ b/src/util/Tokenizer.cxx @@ -23,7 +23,6 @@ #include <glib.h> -#include <stdbool.h> #include <assert.h> #include <string.h> |