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
246 changed files with 320 additions and 317 deletions

View File

@@ -33,7 +33,8 @@
#include "StringView.hxx"
#include "Compiler.h"
#include <assert.h>
#include <cassert>
#include <strings.h>
/**

View File

@@ -35,8 +35,7 @@
#include "Compiler.h"
#include <algorithm>
#include <assert.h>
#include <cassert>
/**
* An array allocated on the heap with a length determined at runtime.

View File

@@ -21,7 +21,7 @@
#include "util/ByteOrder.hxx"
#include "Compiler.h"
#include <assert.h>
#include <cassert>
void
reverse_bytes_16(uint16_t *gcc_restrict dest,

View File

@@ -32,7 +32,8 @@
#include "WritableBuffer.hxx"
#include <assert.h>
#include <cassert>
#include <stddef.h>
/**

View File

@@ -35,7 +35,7 @@
#include <cstddef>
#ifndef NDEBUG
#include <assert.h>
#include <cassert>
#endif
template<typename T>

View File

@@ -20,7 +20,7 @@
#ifndef MPD_DIVIDE_STRING_HXX
#define MPD_DIVIDE_STRING_HXX
#include <assert.h>
#include <cassert>
/**
* Split a given constant string at a separator character. Duplicates

View File

@@ -32,12 +32,10 @@
#include "WritableBuffer.hxx"
#include <utility>
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <assert.h>
#include <utility>
/**
* A first-in-first-out buffer: you can append data at the end, and

View File

@@ -20,10 +20,9 @@
#ifndef MPD_LAZY_RANDOM_ENGINE_HXX
#define MPD_LAZY_RANDOM_ENGINE_HXX
#include <cassert>
#include <random>
#include <assert.h>
/**
* A random engine that will be created and seeded on demand.
*/

View File

@@ -30,11 +30,10 @@
#ifndef MANUAL_HXX
#define MANUAL_HXX
#include <cassert>
#include <new>
#include <utility>
#include <assert.h>
#if defined(__GNUC__) || defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"

View File

@@ -31,7 +31,8 @@
#ifndef NUMBER_PARSER_HXX
#define NUMBER_PARSER_HXX
#include <assert.h>
#include <cassert>
#include <stdint.h>
#include <stdlib.h>

View File

@@ -20,7 +20,7 @@
#ifndef MPD_UTIL_OPTIONDEF_HXX
#define MPD_UTIL_OPTIONDEF_HXX
#include <assert.h>
#include <cassert>
/**
* Command line option definition.

View File

@@ -21,8 +21,8 @@
#include "DynamicFifoBuffer.hxx"
#include <algorithm>
#include <cassert>
#include <assert.h>
#include <string.h>
PeakBuffer::~PeakBuffer()

View File

@@ -23,10 +23,10 @@
#include "HugeAllocator.hxx"
#include "Compiler.h"
#include <utility>
#include <cassert>
#include <new>
#include <utility>
#include <assert.h>
#include <stddef.h>
/**

View File

@@ -34,10 +34,9 @@
#include "ConstBuffer.hxx"
#include "WritableBuffer.hxx"
#include <cassert>
#include <map>
#include <assert.h>
/**
* Helper class for #SparseBuffer which describes which portions of
* the buffer have "known" data.

View File

@@ -32,11 +32,10 @@
#include "WritableBuffer.hxx"
#include <utility>
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <assert.h>
#include <utility>
/**
* A first-in-first-out buffer: you can append data at the end, and

View File

@@ -22,7 +22,7 @@
#include "CharUtil.hxx"
#include "ASCII.hxx"
#include <assert.h>
#include <cassert>
bool
StringArrayContainsCase(const char *const*haystack,

View File

@@ -32,7 +32,8 @@
#include "StringAPI.hxx"
#include "StringCompare.hxx"
#include <assert.h>
#include <cassert>
#include <string.h>
bool

View File

@@ -30,7 +30,8 @@
#include "UriUtil.hxx"
#include "ASCII.hxx"
#include <assert.h>
#include <cassert>
#include <string.h>
static const char *

View File

@@ -36,7 +36,7 @@
#include <cstddef>
#ifndef NDEBUG
#include <assert.h>
#include <cassert>
#endif
template<typename T>