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