replace assert.h with cassert

The former was deprecated with C++14. According to the C++11 and C++17 standards, both files are identical. Signed-off-by: 's avatarRosen Penev <rosenp@gmail.com>
parent a718086f
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
#include "util/StringView.hxx" #include "util/StringView.hxx"
#include <algorithm> #include <algorithm>
#include <cassert>
#include <assert.h>
#include <string.h> #include <string.h>
#ifdef HAVE_ICU_CONVERTER #ifdef HAVE_ICU_CONVERTER
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "Main.hxx" #include "Main.hxx"
#include "Instance.hxx" #include "Instance.hxx"
#include <assert.h> #include <cassert>
void void
idle_add(unsigned flags) idle_add(unsigned flags)
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
#include "IdleFlags.hxx" #include "IdleFlags.hxx"
#include "util/ASCII.hxx" #include "util/ASCII.hxx"
#include <assert.h> #include <cassert>
static const char *const idle_names[] = { static const char *const idle_names[] = {
"database", "database",
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
#include "util/StringStrip.hxx" #include "util/StringStrip.hxx"
#include "config.h" #include "config.h"
#include <assert.h> #include <cassert>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <time.h> #include <time.h>
......
...@@ -30,11 +30,12 @@ ...@@ -30,11 +30,12 @@
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#include "system/Error.hxx" #include "system/Error.hxx"
#include <cassert>
#ifdef ENABLE_SYSTEMD_DAEMON #ifdef ENABLE_SYSTEMD_DAEMON
#include <systemd/sd-daemon.h> #include <systemd/sd-daemon.h>
#endif #endif
#include <assert.h>
#include <string.h> #include <string.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdio.h> #include <stdio.h>
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#include "Main.hxx" #include "Main.hxx"
#endif #endif
#include <assert.h> #include <cassert>
/** /**
* The absolute path of the playlist directory encoded in the * The absolute path of the playlist directory encoded in the
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "MusicBuffer.hxx" #include "MusicBuffer.hxx"
#include "MusicChunk.hxx" #include "MusicChunk.hxx"
#include <assert.h> #include <cassert>
MusicBuffer::MusicBuffer(unsigned num_chunks) MusicBuffer::MusicBuffer(unsigned num_chunks)
:buffer(num_chunks) { :buffer(num_chunks) {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "pcm/AudioFormat.hxx" #include "pcm/AudioFormat.hxx"
#include "tag/Tag.hxx" #include "tag/Tag.hxx"
#include <assert.h> #include <cassert>
MusicChunkInfo::MusicChunkInfo() noexcept = default; MusicChunkInfo::MusicChunkInfo() noexcept = default;
MusicChunkInfo::~MusicChunkInfo() noexcept = default; MusicChunkInfo::~MusicChunkInfo() noexcept = default;
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "MusicPipe.hxx" #include "MusicPipe.hxx"
#include "MusicChunk.hxx" #include "MusicChunk.hxx"
#include <assert.h> #include <cassert>
#ifndef NDEBUG #ifndef NDEBUG
......
...@@ -26,11 +26,11 @@ ...@@ -26,11 +26,11 @@
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#include "util/StringView.hxx" #include "util/StringView.hxx"
#include <cassert>
#include <map> #include <map>
#include <string> #include <string>
#include <utility> #include <utility>
#include <assert.h>
#include <string.h> #include <string.h>
static constexpr char PERMISSION_PASSWORD_CHAR = '@'; static constexpr char PERMISSION_PASSWORD_CHAR = '@';
......
...@@ -42,7 +42,8 @@ ...@@ -42,7 +42,8 @@
#include "util/StringCompare.hxx" #include "util/StringCompare.hxx"
#include "util/UriExtract.hxx" #include "util/UriExtract.hxx"
#include <assert.h> #include <cassert>
#include <string.h> #include <string.h>
static const char PLAYLIST_COMMENT = '#'; static const char PLAYLIST_COMMENT = '#';
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
#include "ReplayGainConfig.hxx" #include "ReplayGainConfig.hxx"
#include "config/Data.hxx" #include "config/Data.hxx"
#include <cassert>
#include <stdexcept> #include <stdexcept>
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
#include "ReplayGainMode.hxx" #include "ReplayGainMode.hxx"
#include <cassert>
#include <stdexcept> #include <stdexcept>
#include <assert.h>
#include <string.h> #include <string.h>
const char * const char *
......
...@@ -19,9 +19,9 @@ ...@@ -19,9 +19,9 @@
#include "SingleMode.hxx" #include "SingleMode.hxx"
#include <cassert>
#include <stdexcept> #include <stdexcept>
#include <assert.h>
#include <string.h> #include <string.h>
const char * const char *
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "PlaylistError.hxx" #include "PlaylistError.hxx"
#include "config.h" #include "config.h"
#include <assert.h> #include <cassert>
#ifdef ENABLE_DATABASE #ifdef ENABLE_DATABASE
......
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
#include "TagArchive.hxx" #include "TagArchive.hxx"
#endif #endif
#include <assert.h> #include <cassert>
#include <string.h> #include <string.h>
#ifdef ENABLE_DATABASE #ifdef ENABLE_DATABASE
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "input/InputStream.hxx" #include "input/InputStream.hxx"
#include "input/LocalOpen.hxx" #include "input/LocalOpen.hxx"
#include <assert.h> #include <cassert>
class TagFileScan { class TagFileScan {
const Path path_fs; const Path path_fs;
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "thread/Mutex.hxx" #include "thread/Mutex.hxx"
#include "util/UriExtract.hxx" #include "util/UriExtract.hxx"
#include <assert.h> #include <cassert>
/** /**
* Does the #DecoderPlugin support either the suffix or the MIME type? * Does the #DecoderPlugin support either the suffix or the MIME type?
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
#include "plugins/Iso9660ArchivePlugin.hxx" #include "plugins/Iso9660ArchivePlugin.hxx"
#include "plugins/ZzipArchivePlugin.hxx" #include "plugins/ZzipArchivePlugin.hxx"
#include <cassert>
#include <iterator> #include <iterator>
#include <assert.h>
#include <string.h> #include <string.h>
const ArchivePlugin *const archive_plugins[] = { const ArchivePlugin *const archive_plugins[] = {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "ArchiveFile.hxx" #include "ArchiveFile.hxx"
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include <assert.h> #include <cassert>
std::unique_ptr<ArchiveFile> std::unique_ptr<ArchiveFile>
archive_file_open(const ArchivePlugin *plugin, Path path) archive_file_open(const ArchivePlugin *plugin, Path path)
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "Response.hxx" #include "Response.hxx"
#include "Idle.hxx" #include "Idle.hxx"
#include <assert.h> #include <cassert>
static void static void
WriteIdleResponse(Response &r, unsigned flags) noexcept WriteIdleResponse(Response &r, unsigned flags) noexcept
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "List.hxx" #include "List.hxx"
#include "util/DeleteDisposer.hxx" #include "util/DeleteDisposer.hxx"
#include <assert.h> #include <cassert>
ClientList::~ClientList() noexcept ClientList::~ClientList() noexcept
{ {
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "net/ToString.hxx" #include "net/ToString.hxx"
#include "Log.hxx" #include "Log.hxx"
#include <assert.h> #include <cassert>
static constexpr char GREETING[] = "OK MPD " PROTOCOL_VERSION "\n"; static constexpr char GREETING[] = "OK MPD " PROTOCOL_VERSION "\n";
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "Partition.hxx" #include "Partition.hxx"
#include "IdleFlags.hxx" #include "IdleFlags.hxx"
#include <assert.h> #include <cassert>
Client::SubscribeResult Client::SubscribeResult
Client::Subscribe(const char *channel) noexcept Client::Subscribe(const char *channel) noexcept
......
...@@ -48,9 +48,9 @@ ...@@ -48,9 +48,9 @@
#include "StickerCommands.hxx" #include "StickerCommands.hxx"
#endif #endif
#include <cassert>
#include <iterator> #include <iterator>
#include <assert.h>
#include <string.h> #include <string.h>
/* /*
......
...@@ -20,11 +20,10 @@ ...@@ -20,11 +20,10 @@
#ifndef MPD_COMMAND_LIST_BUILDER_HXX #ifndef MPD_COMMAND_LIST_BUILDER_HXX
#define MPD_COMMAND_LIST_BUILDER_HXX #define MPD_COMMAND_LIST_BUILDER_HXX
#include <cassert>
#include <list> #include <list>
#include <string> #include <string>
#include <assert.h>
class CommandListBuilder { class CommandListBuilder {
/** /**
* print OK after each command execution * print OK after each command execution
......
...@@ -43,7 +43,8 @@ ...@@ -43,7 +43,8 @@
#include "thread/Mutex.hxx" #include "thread/Mutex.hxx"
#include "Log.hxx" #include "Log.hxx"
#include <assert.h> #include <cassert>
#include <inttypes.h> /* for PRIu64 */ #include <inttypes.h> /* for PRIu64 */
gcc_pure gcc_pure
......
...@@ -25,11 +25,10 @@ ...@@ -25,11 +25,10 @@
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include "Partition.hxx" #include "Partition.hxx"
#include <cassert>
#include <set> #include <set>
#include <string> #include <string>
#include <assert.h>
CommandResult CommandResult
handle_subscribe(Client &client, Request args, Response &r) handle_subscribe(Client &client, Request args, Response &r)
{ {
......
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
#include "db/update/Service.hxx" #include "db/update/Service.hxx"
#endif #endif
#include <assert.h> #include <cassert>
static void static void
print_spl_list(Response &r, const PlaylistVector &list) print_spl_list(Response &r, const PlaylistVector &list)
......
...@@ -25,10 +25,9 @@ ...@@ -25,10 +25,9 @@
#include "Chrono.hxx" #include "Chrono.hxx"
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include <cassert>
#include <utility> #include <utility>
#include <assert.h>
class Response; class Response;
class Request : public ConstBuffer<const char *> { class Request : public ConstBuffer<const char *> {
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
#include "fs/io/BufferedReader.hxx" #include "fs/io/BufferedReader.hxx"
#include "Log.hxx" #include "Log.hxx"
#include <assert.h> #include <cassert>
static constexpr char CONF_COMMENT = '#'; static constexpr char CONF_COMMENT = '#';
......
...@@ -24,7 +24,8 @@ ...@@ -24,7 +24,8 @@
#include "fs/StandardDirectory.hxx" #include "fs/StandardDirectory.hxx"
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#include <assert.h> #include <cassert>
#include <string.h> #include <string.h>
#ifndef _WIN32 #ifndef _WIN32
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "thread/Mutex.hxx" #include "thread/Mutex.hxx"
#include "util/Compiler.h" #include "util/Compiler.h"
#include <assert.h> #include <cassert>
extern Mutex db_mutex; extern Mutex db_mutex;
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#include "util/UriExtract.hxx" #include "util/UriExtract.hxx"
#include "util/UriRelative.hxx" #include "util/UriRelative.hxx"
#include <assert.h> #include <cassert>
DetachedSong DetachedSong
DatabaseDetachSong(const Storage *storage, const LightSong &song) noexcept DatabaseDetachSong(const Storage *storage, const LightSong &song) noexcept
......
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
#include "db/DatabaseLock.hxx" #include "db/DatabaseLock.hxx"
#include <algorithm> #include <algorithm>
#include <cassert>
#include <assert.h>
PlaylistVector::iterator PlaylistVector::iterator
PlaylistVector::find(const char *name) noexcept PlaylistVector::find(const char *name) noexcept
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
#include "song/Filter.hxx" #include "song/Filter.hxx"
#include <algorithm> #include <algorithm>
#include <cassert>
#include <utility> #include <utility>
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
......
...@@ -33,7 +33,8 @@ ...@@ -33,7 +33,8 @@
#include "util/Alloc.hxx" #include "util/Alloc.hxx"
#include "util/DeleteDisposer.hxx" #include "util/DeleteDisposer.hxx"
#include <assert.h> #include <cassert>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -40,10 +40,10 @@ ...@@ -40,10 +40,10 @@
#include "util/RecursiveMap.hxx" #include "util/RecursiveMap.hxx"
#include "util/SplitString.hxx" #include "util/SplitString.hxx"
#include <cassert>
#include <string> #include <string>
#include <utility> #include <utility>
#include <assert.h>
#include <string.h> #include <string.h>
static const char *const rootid = "0"; static const char *const rootid = "0";
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#include "db/plugins/simple/Directory.hxx" #include "db/plugins/simple/Directory.hxx"
#include "db/plugins/simple/Song.hxx" #include "db/plugins/simple/Song.hxx"
#include <assert.h> #include <cassert>
void void
DatabaseEditor::DeleteSong(Directory &dir, Song *del) DatabaseEditor::DeleteSong(Directory &dir, Song *del)
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "util/StringStrip.hxx" #include "util/StringStrip.hxx"
#include "config.h" #include "config.h"
#include <assert.h> #include <cassert>
#ifdef HAVE_CLASS_GLOB #ifdef HAVE_CLASS_GLOB
......
...@@ -27,11 +27,11 @@ ...@@ -27,11 +27,11 @@
#include "fs/Traits.hxx" #include "fs/Traits.hxx"
#include "Log.hxx" #include "Log.hxx"
#include <string> #include <cassert>
#include <map>
#include <forward_list> #include <forward_list>
#include <map>
#include <string>
#include <assert.h>
#include <sys/inotify.h> #include <sys/inotify.h>
#include <string.h> #include <string.h>
#include <dirent.h> #include <dirent.h>
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
#include "event/Loop.hxx" #include "event/Loop.hxx"
#endif #endif
#include <assert.h> #include <cassert>
UpdateService::UpdateService(const ConfigData &_config, UpdateService::UpdateService(const ConfigData &_config,
EventLoop &_loop, SimpleDatabase &_db, EventLoop &_loop, SimpleDatabase &_db,
......
...@@ -38,10 +38,10 @@ ...@@ -38,10 +38,10 @@
#include "util/UriExtract.hxx" #include "util/UriExtract.hxx"
#include "Log.hxx" #include "Log.hxx"
#include <cassert>
#include <exception> #include <exception>
#include <memory> #include <memory>
#include <assert.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
......
...@@ -36,7 +36,8 @@ ...@@ -36,7 +36,8 @@
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include "util/StringBuffer.hxx" #include "util/StringBuffer.hxx"
#include <assert.h> #include <cassert>
#include <string.h> #include <string.h>
#include <math.h> #include <math.h>
......
...@@ -21,10 +21,9 @@ ...@@ -21,10 +21,9 @@
#include "MusicPipe.hxx" #include "MusicPipe.hxx"
#include "song/DetachedSong.hxx" #include "song/DetachedSong.hxx"
#include <cassert>
#include <stdexcept> #include <stdexcept>
#include <assert.h>
DecoderControl::DecoderControl(Mutex &_mutex, Cond &_client_cond, DecoderControl::DecoderControl(Mutex &_mutex, Cond &_client_cond,
InputCacheManager *_input_cache, InputCacheManager *_input_cache,
const AudioFormat _configured_audio_format, const AudioFormat _configured_audio_format,
......
...@@ -31,11 +31,11 @@ ...@@ -31,11 +31,11 @@
#include "ReplayGainConfig.hxx" #include "ReplayGainConfig.hxx"
#include "ReplayGainMode.hxx" #include "ReplayGainMode.hxx"
#include <cassert>
#include <exception> #include <exception>
#include <utility>
#include <memory> #include <memory>
#include <utility>
#include <assert.h>
#include <stdint.h> #include <stdint.h>
/* damn you, windows.h! */ /* damn you, windows.h! */
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "input/InputStream.hxx" #include "input/InputStream.hxx"
#include "Log.hxx" #include "Log.hxx"
#include <assert.h> #include <cassert>
size_t size_t
decoder_read(DecoderClient *client, decoder_read(DecoderClient *client,
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "DecoderPlugin.hxx" #include "DecoderPlugin.hxx"
#include "util/StringUtil.hxx" #include "util/StringUtil.hxx"
#include <assert.h> #include <cassert>
bool bool
DecoderPlugin::SupportsSuffix(const char *suffix) const noexcept DecoderPlugin::SupportsSuffix(const char *suffix) const noexcept
......
...@@ -22,10 +22,9 @@ ...@@ -22,10 +22,9 @@
#include "DecoderPlugin.hxx" #include "DecoderPlugin.hxx"
#include "client/Response.hxx" #include "client/Response.hxx"
#include <cassert>
#include <functional> #include <functional>
#include <assert.h>
static void static void
decoder_plugin_print(Response &r, decoder_plugin_print(Response &r,
const DecoderPlugin &plugin) const DecoderPlugin &plugin)
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <adplug/adplug.h> #include <adplug/adplug.h>
#include <adplug/emuopl.h> #include <adplug/emuopl.h>
#include <assert.h> #include <cassert>
static constexpr Domain adplug_domain("adplug"); static constexpr Domain adplug_domain("adplug");
......
...@@ -29,9 +29,9 @@ ...@@ -29,9 +29,9 @@
#include <audiofile.h> #include <audiofile.h>
#include <af_vfs.h> #include <af_vfs.h>
#include <cassert>
#include <exception> #include <exception>
#include <assert.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
......
...@@ -30,9 +30,9 @@ ...@@ -30,9 +30,9 @@
#include <neaacdec.h> #include <neaacdec.h>
#include <cassert>
#include <cmath> #include <cmath>
#include <assert.h>
#include <string.h> #include <string.h>
static const unsigned adts_sample_rates[] = static const unsigned adts_sample_rates[] =
......
...@@ -52,7 +52,8 @@ extern "C" { ...@@ -52,7 +52,8 @@ extern "C" {
#include <libavutil/frame.h> #include <libavutil/frame.h>
} }
#include <assert.h> #include <cassert>
#include <string.h> #include <string.h>
/** /**
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include <assert.h> #include <cassert>
void void
FlacPcmImport::Open(unsigned sample_rate, unsigned bits_per_sample, FlacPcmImport::Open(unsigned sample_rate, unsigned bits_per_sample,
......
...@@ -22,10 +22,9 @@ ...@@ -22,10 +22,9 @@
#include <FLAC/stream_decoder.h> #include <FLAC/stream_decoder.h>
#include <utility> #include <cassert>
#include <stdexcept> #include <stdexcept>
#include <utility>
#include <assert.h>
/** /**
* OO wrapper for a FLAC__StreamDecoder. * OO wrapper for a FLAC__StreamDecoder.
......
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
#include <gme/gme.h> #include <gme/gme.h>
#include <assert.h> #include <cassert>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
......
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
#include <id3tag.h> #include <id3tag.h>
#endif #endif
#include <assert.h> #include <cassert>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <mikmod.h> #include <mikmod.h>
#include <assert.h> #include <cassert>
static constexpr Domain mikmod_domain("mikmod"); static constexpr Domain mikmod_domain("mikmod");
......
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
#include <libmodplug/modplug.h> #include <libmodplug/modplug.h>
#include <cassert>
#include <assert.h>
static constexpr Domain modplug_domain("modplug"); static constexpr Domain modplug_domain("modplug");
......
...@@ -31,13 +31,11 @@ ...@@ -31,13 +31,11 @@
#include <wavpack/wavpack.h> #include <wavpack/wavpack.h>
#include <algorithm> #include <algorithm>
#include <cassert>
#include <cstdlib>
#include <iterator> #include <iterator>
#include <memory> #include <memory>
#include <cstdlib>
#include <assert.h>
#define ERRORLEN 80 #define ERRORLEN 80
#ifdef OPEN_DSD_AS_PCM #ifdef OPEN_DSD_AS_PCM
......
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
#include "EncoderPlugin.hxx" #include "EncoderPlugin.hxx"
#include "util/Compiler.h" #include "util/Compiler.h"
#include <assert.h> #include <cassert>
#include <stddef.h> #include <stddef.h>
struct AudioFormat; struct AudioFormat;
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#include <lame/lame.h> #include <lame/lame.h>
#include <cassert>
#include <stdexcept> #include <stdexcept>
#include <assert.h>
#include <string.h> #include <string.h>
class LameEncoder final : public Encoder { class LameEncoder final : public Encoder {
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#include <opus.h> #include <opus.h>
#include <ogg/ogg.h> #include <ogg/ogg.h>
#include <cassert>
#include <stdexcept> #include <stdexcept>
#include <assert.h>
#include <stdlib.h> #include <stdlib.h>
namespace { namespace {
......
...@@ -27,9 +27,9 @@ ...@@ -27,9 +27,9 @@
#include <twolame.h> #include <twolame.h>
#include <cassert>
#include <stdexcept> #include <stdexcept>
#include <assert.h>
#include <string.h> #include <string.h>
class TwolameEncoder final : public Encoder { class TwolameEncoder final : public Encoder {
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
#include "util/ByteOrder.hxx" #include "util/ByteOrder.hxx"
#include "util/DynamicFifoBuffer.hxx" #include "util/DynamicFifoBuffer.hxx"
#include <assert.h> #include <cassert>
#include <string.h> #include <string.h>
static constexpr uint16_t WAVE_FORMAT_PCM = 1; static constexpr uint16_t WAVE_FORMAT_PCM = 1;
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
#include "SocketMonitor.hxx" #include "SocketMonitor.hxx"
#include "util/StaticFifoBuffer.hxx" #include "util/StaticFifoBuffer.hxx"
#include <cassert>
#include <exception> #include <exception>
#include <assert.h>
#include <stdint.h> #include <stdint.h>
class EventLoop; class EventLoop;
......
...@@ -23,10 +23,9 @@ ...@@ -23,10 +23,9 @@
#include "thread/Mutex.hxx" #include "thread/Mutex.hxx"
#include "thread/Cond.hxx" #include "thread/Cond.hxx"
#include <cassert>
#include <exception> #include <exception>
#include <assert.h>
class BlockingCallMonitor final class BlockingCallMonitor final
{ {
DeferEvent defer_event; DeferEvent defer_event;
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
#include "net/SocketError.hxx" #include "net/SocketError.hxx"
#include "util/Compiler.h" #include "util/Compiler.h"
#include <assert.h> #include <cassert>
#include <string.h> #include <string.h>
FullyBufferedSocket::ssize_t FullyBufferedSocket::ssize_t
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
#include "IdleMonitor.hxx" #include "IdleMonitor.hxx"
#include "Loop.hxx" #include "Loop.hxx"
#include <assert.h> #include <cassert>
void void
IdleMonitor::Cancel() noexcept IdleMonitor::Cancel() noexcept
......
...@@ -34,10 +34,9 @@ ...@@ -34,10 +34,9 @@
#include <boost/intrusive/set.hpp> #include <boost/intrusive/set.hpp>
#include <boost/intrusive/list.hpp> #include <boost/intrusive/list.hpp>
#include <chrono>
#include <atomic> #include <atomic>
#include <cassert>
#include <assert.h> #include <chrono>
/** /**
* An event loop that polls for events on file/socket descriptors. * An event loop that polls for events on file/socket descriptors.
......
...@@ -24,11 +24,10 @@ ...@@ -24,11 +24,10 @@
#include "TimerEvent.hxx" #include "TimerEvent.hxx"
#include "SocketMonitor.hxx" #include "SocketMonitor.hxx"
#include <cassert>
#include <forward_list> #include <forward_list>
#include <iterator> #include <iterator>
#include <assert.h>
#ifndef _WIN32 #ifndef _WIN32
struct pollfd; struct pollfd;
#endif #endif
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "PollGroupPoll.hxx" #include "PollGroupPoll.hxx"
#include <assert.h> #include <cassert>
PollGroupPoll::PollGroupPoll() noexcept = default; PollGroupPoll::PollGroupPoll() noexcept = default;
PollGroupPoll::~PollGroupPoll() noexcept = default; PollGroupPoll::~PollGroupPoll() noexcept = default;
......
...@@ -22,11 +22,11 @@ ...@@ -22,11 +22,11 @@
#include "PollResultGeneric.hxx" #include "PollResultGeneric.hxx"
#include <assert.h> #include <cassert>
#include <string.h>
#include <unordered_map> #include <unordered_map>
#include <string.h>
#include <windows.h> #include <windows.h>
#include <winsock2.h> #include <winsock2.h>
......
...@@ -35,11 +35,10 @@ ...@@ -35,11 +35,10 @@
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "Log.hxx" #include "Log.hxx"
#include <cassert>
#include <string> #include <string>
#include <utility> #include <utility>
#include <assert.h>
#ifdef HAVE_UN #ifdef HAVE_UN
#include <sys/stat.h> #include <sys/stat.h>
#endif #endif
......
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
#endif #endif
#include <algorithm> #include <algorithm>
#include <cassert>
#ifdef USE_SIGNALFD #ifdef USE_SIGNALFD
#include <pthread.h> #include <pthread.h>
#endif #endif
#include <assert.h>
#include <signal.h> #include <signal.h>
class SignalMonitor final : private SocketMonitor { class SignalMonitor final : private SocketMonitor {
......
...@@ -20,10 +20,9 @@ ...@@ -20,10 +20,9 @@
#include "SocketMonitor.hxx" #include "SocketMonitor.hxx"
#include "Loop.hxx" #include "Loop.hxx"
#include <cassert>
#include <utility> #include <utility>
#include <assert.h>
void void
SocketMonitor::Dispatch(unsigned flags) noexcept SocketMonitor::Dispatch(unsigned flags) noexcept
{ {
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
#include "PollGroup.hxx" #include "PollGroup.hxx"
#include "net/SocketDescriptor.hxx" #include "net/SocketDescriptor.hxx"
#include <cassert>
#include <type_traits> #include <type_traits>
#include <assert.h>
#include <stddef.h> #include <stddef.h>
class EventLoop; class EventLoop;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "pcm/AudioFormat.hxx" #include "pcm/AudioFormat.hxx"
#include <assert.h> #include <cassert>
template<typename T> struct ConstBuffer; template<typename T> struct ConstBuffer;
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#include "Prepared.hxx" #include "Prepared.hxx"
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include <assert.h> #include <cassert>
class FilterObserver::PreparedProxy final : public PreparedFilter { class FilterObserver::PreparedProxy final : public PreparedFilter {
FilterObserver &observer; FilterObserver &observer;
......
...@@ -24,10 +24,9 @@ ...@@ -24,10 +24,9 @@
#include "pcm/AudioFormat.hxx" #include "pcm/AudioFormat.hxx"
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include <cassert>
#include <memory> #include <memory>
#include <assert.h>
class AutoConvertFilter final : public Filter { class AutoConvertFilter final : public Filter {
/** /**
* The underlying filter. * The underlying filter.
......
...@@ -25,10 +25,9 @@ ...@@ -25,10 +25,9 @@
#include "util/StringBuffer.hxx" #include "util/StringBuffer.hxx"
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#include <memory> #include <cassert>
#include <list> #include <list>
#include <memory>
#include <assert.h>
class ChainFilter final : public Filter { class ChainFilter final : public Filter {
struct Child { struct Child {
......
...@@ -24,10 +24,9 @@ ...@@ -24,10 +24,9 @@
#include "pcm/Convert.hxx" #include "pcm/Convert.hxx"
#include "util/ConstBuffer.hxx" #include "util/ConstBuffer.hxx"
#include <cassert>
#include <memory> #include <memory>
#include <assert.h>
class ConvertFilter final : public Filter { class ConvertFilter final : public Filter {
/** /**
* The input audio format; PCM data is passed to the filter() * The input audio format; PCM data is passed to the filter()
......
...@@ -29,10 +29,9 @@ ...@@ -29,10 +29,9 @@
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "Log.hxx" #include "Log.hxx"
#include <cassert>
#include <exception> #include <exception>
#include <assert.h>
static constexpr Domain replay_gain_domain("replay_gain"); static constexpr Domain replay_gain_domain("replay_gain");
class ReplayGainFilter final : public Filter { class ReplayGainFilter final : public Filter {
......
...@@ -31,8 +31,7 @@ ...@@ -31,8 +31,7 @@
#endif #endif
#include <algorithm> #include <algorithm>
#include <cassert>
#include <assert.h>
#ifdef HAVE_FS_CHARSET #ifdef HAVE_FS_CHARSET
......
...@@ -23,10 +23,9 @@ ...@@ -23,10 +23,9 @@
#include "util/Compiler.h" #include "util/Compiler.h"
#include "Traits.hxx" #include "Traits.hxx"
#include <cassert>
#include <string> #include <string>
#include <assert.h>
class AllocatedPath; class AllocatedPath;
/** /**
......
...@@ -29,10 +29,9 @@ ...@@ -29,10 +29,9 @@
#include <tchar.h> #include <tchar.h>
#endif #endif
#include <cassert>
#include <string> #include <string>
#include <assert.h>
#ifdef _WIN32 #ifdef _WIN32
#define PATH_LITERAL(s) _T(s) #define PATH_LITERAL(s) _T(s)
#else #else
......
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
#include "system/FileDescriptor.hxx" #include "system/FileDescriptor.hxx"
#endif #endif
#include <assert.h> #include <cassert>
#include <stdint.h> #include <stdint.h>
#ifdef _WIN32 #ifdef _WIN32
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
#include "system/Error.hxx" #include "system/Error.hxx"
#include "system/Open.hxx" #include "system/Open.hxx"
#include <assert.h> #include <cassert>
#ifdef _WIN32 #ifdef _WIN32
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
#include "PeekReader.hxx" #include "PeekReader.hxx"
#include <algorithm> #include <algorithm>
#include <cassert>
#include <assert.h>
#include <string.h> #include <string.h>
const void * const void *
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "BufferedReader.hxx" #include "BufferedReader.hxx"
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include <assert.h> #include <cassert>
TextFile::TextFile(Path path_fs) TextFile::TextFile(Path path_fs)
:file_reader(std::make_unique<FileReader>(path_fs)), :file_reader(std::make_unique<FileReader>(path_fs)),
......
...@@ -23,9 +23,9 @@ ...@@ -23,9 +23,9 @@
#include "thread/Cond.hxx" #include "thread/Cond.hxx"
#include "event/Loop.hxx" #include "event/Loop.hxx"
#include <cassert>
#include <stdexcept> #include <stdexcept>
#include <assert.h>
#include <string.h> #include <string.h>
AsyncInputStream::AsyncInputStream(EventLoop &event_loop, const char *_url, AsyncInputStream::AsyncInputStream(EventLoop &event_loop, const char *_url,
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
#include "InputStream.hxx" #include "InputStream.hxx"
#include "BufferingInputStream.hxx" #include "BufferingInputStream.hxx"
#include <assert.h> #include <cassert>
/** /**
* A "huge" buffer which remembers the (partial) contents of an * A "huge" buffer which remembers the (partial) contents of an
......
...@@ -27,10 +27,9 @@ ...@@ -27,10 +27,9 @@
#include "PluginUnavailable.hxx" #include "PluginUnavailable.hxx"
#include "util/RuntimeError.hxx" #include "util/RuntimeError.hxx"
#include <cassert>
#include <stdexcept> #include <stdexcept>
#include <assert.h>
void void
input_stream_global_init(const ConfigData &config, EventLoop &event_loop) input_stream_global_init(const ConfigData &config, EventLoop &event_loop)
{ {
......
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
#include "InputPlugin.hxx" #include "InputPlugin.hxx"
#include "util/StringCompare.hxx" #include "util/StringCompare.hxx"
#include <assert.h>
#include <algorithm> #include <algorithm>
#include <cassert>
#include <iterator> #include <iterator>
bool bool
...@@ -71,4 +71,4 @@ protocol_is_whitelisted(const char *proto) { ...@@ -71,4 +71,4 @@ protocol_is_whitelisted(const char *proto) {
return std::binary_search(begin, end, proto, [](const char* a, const char* b) { return std::binary_search(begin, end, proto, [](const char* a, const char* b) {
return strcasecmp(a,b) < 0; return strcasecmp(a,b) < 0;
}); });
} }
\ No newline at end of file
...@@ -23,7 +23,8 @@ ...@@ -23,7 +23,8 @@
#include "Ptr.hxx" #include "Ptr.hxx"
#include "thread/Mutex.hxx" #include "thread/Mutex.hxx"
#include "util/Compiler.h" #include "util/Compiler.h"
#include <assert.h>
#include <cassert>
#include <set> #include <set>
#include <string> #include <string>
......
...@@ -22,10 +22,9 @@ ...@@ -22,10 +22,9 @@
#include "tag/Tag.hxx" #include "tag/Tag.hxx"
#include "util/ASCII.hxx" #include "util/ASCII.hxx"
#include <cassert>
#include <stdexcept> #include <stdexcept>
#include <assert.h>
InputStream::~InputStream() noexcept = default; InputStream::~InputStream() noexcept = default;
void void
......
...@@ -25,10 +25,9 @@ ...@@ -25,10 +25,9 @@
#include "thread/Mutex.hxx" #include "thread/Mutex.hxx"
#include "util/Compiler.h" #include "util/Compiler.h"
#include <string> #include <cassert>
#include <memory> #include <memory>
#include <string>
#include <assert.h>
struct Tag; struct Tag;
class InputStreamHandler; class InputStreamHandler;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include "fs/Path.hxx" #include "fs/Path.hxx"
#include "system/Error.hxx" #include "system/Error.hxx"
#include <assert.h> #include <cassert>
InputStreamPtr InputStreamPtr
OpenLocalInputStream(Path path, Mutex &mutex) OpenLocalInputStream(Path path, Mutex &mutex)
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
#include "RewindInputStream.hxx" #include "RewindInputStream.hxx"
#include "ProxyInputStream.hxx" #include "ProxyInputStream.hxx"
#include <assert.h> #include <cassert>
#include <string.h> #include <string.h>
class RewindInputStream final : public ProxyInputStream { class RewindInputStream final : public ProxyInputStream {
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include "InputStream.hxx" #include "InputStream.hxx"
#include "util/TextFile.hxx" #include "util/TextFile.hxx"
#include <assert.h> #include <cassert>
TextInputStream::TextInputStream(InputStreamPtr &&_is) noexcept TextInputStream::TextInputStream(InputStreamPtr &&_is) noexcept
:is(std::move(_is)) {} :is(std::move(_is)) {}
......
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