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: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-03-12 15:20:59 -07:00
parent a718086ffb
commit ab9f5d2067
No known key found for this signature in database
GPG Key ID: 36D31CFA845F0E3B
246 changed files with 320 additions and 317 deletions

View File

@ -23,8 +23,8 @@
#include "util/StringView.hxx"
#include <algorithm>
#include <cassert>
#include <assert.h>
#include <string.h>
#ifdef HAVE_ICU_CONVERTER

View File

@ -26,7 +26,7 @@
#include "Main.hxx"
#include "Instance.hxx"
#include <assert.h>
#include <cassert>
void
idle_add(unsigned flags)

View File

@ -25,7 +25,7 @@
#include "IdleFlags.hxx"
#include "util/ASCII.hxx"
#include <assert.h>
#include <cassert>
static const char *const idle_names[] = {
"database",

View File

@ -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>

View File

@ -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>

View File

@ -33,7 +33,7 @@
#include "Main.hxx"
#endif
#include <assert.h>
#include <cassert>
/**
* The absolute path of the playlist directory encoded in the

View File

@ -20,7 +20,7 @@
#include "MusicBuffer.hxx"
#include "MusicChunk.hxx"
#include <assert.h>
#include <cassert>
MusicBuffer::MusicBuffer(unsigned num_chunks)
:buffer(num_chunks) {

View File

@ -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;

View File

@ -20,7 +20,7 @@
#include "MusicPipe.hxx"
#include "MusicChunk.hxx"
#include <assert.h>
#include <cassert>
#ifndef NDEBUG

View File

@ -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 = '@';

View File

@ -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 = '#';

View File

@ -21,9 +21,9 @@
#include "ReplayGainConfig.hxx"
#include "config/Data.hxx"
#include <cassert>
#include <stdexcept>
#include <assert.h>
#include <stdlib.h>
#include <math.h>

View File

@ -19,9 +19,9 @@
#include "ReplayGainMode.hxx"
#include <cassert>
#include <stdexcept>
#include <assert.h>
#include <string.h>
const char *

View File

@ -19,9 +19,9 @@
#include "SingleMode.hxx"
#include <cassert>
#include <stdexcept>
#include <assert.h>
#include <string.h>
const char *

View File

@ -26,7 +26,7 @@
#include "PlaylistError.hxx"
#include "config.h"
#include <assert.h>
#include <cassert>
#ifdef ENABLE_DATABASE

View File

@ -34,7 +34,8 @@
#include "TagArchive.hxx"
#endif
#include <assert.h>
#include <cassert>
#include <string.h>
#ifdef ENABLE_DATABASE

View File

@ -27,7 +27,7 @@
#include "input/InputStream.hxx"
#include "input/LocalOpen.hxx"
#include <assert.h>
#include <cassert>
class TagFileScan {
const Path path_fs;

View File

@ -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?

View File

@ -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[] = {

View File

@ -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)

View File

@ -22,7 +22,7 @@
#include "Response.hxx"
#include "Idle.hxx"
#include <assert.h>
#include <cassert>
static void
WriteIdleResponse(Response &r, unsigned flags) noexcept

View File

@ -20,7 +20,7 @@
#include "List.hxx"
#include "util/DeleteDisposer.hxx"
#include <assert.h>
#include <cassert>
ClientList::~ClientList() noexcept
{

View File

@ -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";

View File

@ -21,7 +21,7 @@
#include "Partition.hxx"
#include "IdleFlags.hxx"
#include <assert.h>
#include <cassert>
Client::SubscribeResult
Client::Subscribe(const char *channel) noexcept

View File

@ -48,9 +48,9 @@
#include "StickerCommands.hxx"
#endif
#include <cassert>
#include <iterator>
#include <assert.h>
#include <string.h>
/*

View File

@ -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

View File

@ -43,7 +43,8 @@
#include "thread/Mutex.hxx"
#include "Log.hxx"
#include <assert.h>
#include <cassert>
#include <inttypes.h> /* for PRIu64 */
gcc_pure

View File

@ -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)
{

View File

@ -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)

View File

@ -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 *> {

View File

@ -35,7 +35,7 @@
#include "fs/io/BufferedReader.hxx"
#include "Log.hxx"
#include <assert.h>
#include <cassert>
static constexpr char CONF_COMMENT = '#';

View File

@ -24,7 +24,8 @@
#include "fs/StandardDirectory.hxx"
#include "util/RuntimeError.hxx"
#include <assert.h>
#include <cassert>
#include <string.h>
#ifndef _WIN32

View File

@ -29,7 +29,7 @@
#include "thread/Mutex.hxx"
#include "util/Compiler.h"
#include <assert.h>
#include <cassert>
extern Mutex db_mutex;

View File

@ -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

View File

@ -21,8 +21,7 @@
#include "db/DatabaseLock.hxx"
#include <algorithm>
#include <assert.h>
#include <cassert>
PlaylistVector::iterator
PlaylistVector::find(const char *name) noexcept

View File

@ -23,9 +23,9 @@
#include "song/Filter.hxx"
#include <algorithm>
#include <cassert>
#include <utility>
#include <assert.h>
#include <stdlib.h>
#include <string.h>

View File

@ -33,7 +33,8 @@
#include "util/Alloc.hxx"
#include "util/DeleteDisposer.hxx"
#include <assert.h>
#include <cassert>
#include <string.h>
#include <stdlib.h>

View File

@ -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";

View File

@ -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)

View File

@ -29,7 +29,7 @@
#include "util/StringStrip.hxx"
#include "config.h"
#include <assert.h>
#include <cassert>
#ifdef HAVE_CLASS_GLOB

View File

@ -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>

View File

@ -36,7 +36,7 @@
#include "event/Loop.hxx"
#endif
#include <assert.h>
#include <cassert>
UpdateService::UpdateService(const ConfigData &_config,
EventLoop &_loop, SimpleDatabase &_db,

View File

@ -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>

View File

@ -36,7 +36,8 @@
#include "util/ConstBuffer.hxx"
#include "util/StringBuffer.hxx"
#include <assert.h>
#include <cassert>
#include <string.h>
#include <math.h>

View File

@ -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,

View File

@ -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! */

View File

@ -21,7 +21,7 @@
#include "input/InputStream.hxx"
#include "Log.hxx"
#include <assert.h>
#include <cassert>
size_t
decoder_read(DecoderClient *client,

View File

@ -20,7 +20,7 @@
#include "DecoderPlugin.hxx"
#include "util/StringUtil.hxx"
#include <assert.h>
#include <cassert>
bool
DecoderPlugin::SupportsSuffix(const char *suffix) const noexcept

View File

@ -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)

View File

@ -29,7 +29,7 @@
#include <adplug/adplug.h>
#include <adplug/emuopl.h>
#include <assert.h>
#include <cassert>
static constexpr Domain adplug_domain("adplug");

View File

@ -29,9 +29,9 @@
#include <audiofile.h>
#include <af_vfs.h>
#include <cassert>
#include <exception>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>

View File

@ -30,9 +30,9 @@
#include <neaacdec.h>
#include <cassert>
#include <cmath>
#include <assert.h>
#include <string.h>
static const unsigned adts_sample_rates[] =

View File

@ -52,7 +52,8 @@ extern "C" {
#include <libavutil/frame.h>
}
#include <assert.h>
#include <cassert>
#include <string.h>
/**

View File

@ -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,

View File

@ -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.

View File

@ -37,7 +37,8 @@
#include <gme/gme.h>
#include <assert.h>
#include <cassert>
#include <stdlib.h>
#include <string.h>

View File

@ -39,7 +39,8 @@
#include <id3tag.h>
#endif
#include <assert.h>
#include <cassert>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

View File

@ -29,7 +29,7 @@
#include <mikmod.h>
#include <assert.h>
#include <cassert>
static constexpr Domain mikmod_domain("mikmod");

View File

@ -29,8 +29,7 @@
#include <libmodplug/modplug.h>
#include <assert.h>
#include <cassert>
static constexpr Domain modplug_domain("modplug");

View File

@ -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

View File

@ -23,7 +23,8 @@
#include "EncoderPlugin.hxx"
#include "util/Compiler.h"
#include <assert.h>
#include <cassert>
#include <stddef.h>
struct AudioFormat;

View File

@ -26,9 +26,9 @@
#include <lame/lame.h>
#include <cassert>
#include <stdexcept>
#include <assert.h>
#include <string.h>
class LameEncoder final : public Encoder {

View File

@ -26,9 +26,9 @@
#include <opus.h>
#include <ogg/ogg.h>
#include <cassert>
#include <stdexcept>
#include <assert.h>
#include <stdlib.h>
namespace {

View File

@ -27,9 +27,9 @@
#include <twolame.h>
#include <cassert>
#include <stdexcept>
#include <assert.h>
#include <string.h>
class TwolameEncoder final : public Encoder {

View File

@ -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;

View File

@ -23,9 +23,9 @@
#include "SocketMonitor.hxx"
#include "util/StaticFifoBuffer.hxx"
#include <cassert>
#include <exception>
#include <assert.h>
#include <stdint.h>
class EventLoop;

View File

@ -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;

View File

@ -21,7 +21,8 @@
#include "net/SocketError.hxx"
#include "util/Compiler.h"
#include <assert.h>
#include <cassert>
#include <string.h>
FullyBufferedSocket::ssize_t

View File

@ -20,7 +20,7 @@
#include "IdleMonitor.hxx"
#include "Loop.hxx"
#include <assert.h>
#include <cassert>
void
IdleMonitor::Cancel() noexcept

View File

@ -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.

View File

@ -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

View File

@ -23,7 +23,7 @@
#include "PollGroupPoll.hxx"
#include <assert.h>
#include <cassert>
PollGroupPoll::PollGroupPoll() noexcept = default;
PollGroupPoll::~PollGroupPoll() noexcept = default;

View File

@ -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>

View File

@ -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

View File

@ -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 {

View File

@ -20,10 +20,9 @@
#include "SocketMonitor.hxx"
#include "Loop.hxx"
#include <cassert>
#include <utility>
#include <assert.h>
void
SocketMonitor::Dispatch(unsigned flags) noexcept
{

View File

@ -23,9 +23,9 @@
#include "PollGroup.hxx"
#include "net/SocketDescriptor.hxx"
#include <cassert>
#include <type_traits>
#include <assert.h>
#include <stddef.h>
class EventLoop;

View File

@ -22,7 +22,7 @@
#include "pcm/AudioFormat.hxx"
#include <assert.h>
#include <cassert>
template<typename T> struct ConstBuffer;

View File

@ -22,7 +22,7 @@
#include "Prepared.hxx"
#include "util/ConstBuffer.hxx"
#include <assert.h>
#include <cassert>
class FilterObserver::PreparedProxy final : public PreparedFilter {
FilterObserver &observer;

View File

@ -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.

View File

@ -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 {

View File

@ -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()

View File

@ -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 {

View File

@ -31,8 +31,7 @@
#endif
#include <algorithm>
#include <assert.h>
#include <cassert>
#ifdef HAVE_FS_CHARSET

View File

@ -23,10 +23,9 @@
#include "util/Compiler.h"
#include "Traits.hxx"
#include <cassert>
#include <string>
#include <assert.h>
class AllocatedPath;
/**

View File

@ -29,10 +29,9 @@
#include <tchar.h>
#endif
#include <cassert>
#include <string>
#include <assert.h>
#ifdef _WIN32
#define PATH_LITERAL(s) _T(s)
#else

View File

@ -38,7 +38,8 @@
#include "system/FileDescriptor.hxx"
#endif
#include <assert.h>
#include <cassert>
#include <stdint.h>
#ifdef _WIN32

View File

@ -32,7 +32,7 @@
#include "system/Error.hxx"
#include "system/Open.hxx"
#include <assert.h>
#include <cassert>
#ifdef _WIN32

View File

@ -20,8 +20,8 @@
#include "PeekReader.hxx"
#include <algorithm>
#include <cassert>
#include <assert.h>
#include <string.h>
const void *

View File

@ -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)),

View File

@ -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,

View File

@ -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

View File

@ -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)
{

View File

@ -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;
});
}
}

View 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>

View File

@ -22,10 +22,9 @@
#include "tag/Tag.hxx"
#include "util/ASCII.hxx"
#include <cassert>
#include <stdexcept>
#include <assert.h>
InputStream::~InputStream() noexcept = default;
void

View File

@ -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;

View File

@ -29,7 +29,7 @@
#include "fs/Path.hxx"
#include "system/Error.hxx"
#include <assert.h>
#include <cassert>
InputStreamPtr
OpenLocalInputStream(Path path, Mutex &mutex)

View File

@ -20,7 +20,8 @@
#include "RewindInputStream.hxx"
#include "ProxyInputStream.hxx"
#include <assert.h>
#include <cassert>
#include <string.h>
class RewindInputStream final : public ProxyInputStream {

View File

@ -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)) {}

Some files were not shown because too many files have changed in this diff Show More