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
+2 -1
View File
@@ -33,7 +33,8 @@
#include "StringView.hxx"
#include "Compiler.h"
#include <assert.h>
#include <cassert>
#include <strings.h>
/**
+1 -2
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.
+1 -1
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,
+2 -1
View File
@@ -32,7 +32,8 @@
#include "WritableBuffer.hxx"
#include <assert.h>
#include <cassert>
#include <stddef.h>
/**
+1 -1
View File
@@ -35,7 +35,7 @@
#include <cstddef>
#ifndef NDEBUG
#include <assert.h>
#include <cassert>
#endif
template<typename T>
+1 -1
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
+2 -4
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
+1 -2
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.
*/
+1 -2
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"
+2 -1
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>
+1 -1
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.
+1 -1
View File
@@ -21,8 +21,8 @@
#include "DynamicFifoBuffer.hxx"
#include <algorithm>
#include <cassert>
#include <assert.h>
#include <string.h>
PeakBuffer::~PeakBuffer()
+2 -2
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>
/**
+1 -2
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.
+2 -3
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
+1 -1
View File
@@ -22,7 +22,7 @@
#include "CharUtil.hxx"
#include "ASCII.hxx"
#include <assert.h>
#include <cassert>
bool
StringArrayContainsCase(const char *const*haystack,
+2 -1
View File
@@ -32,7 +32,8 @@
#include "StringAPI.hxx"
#include "StringCompare.hxx"
#include <assert.h>
#include <cassert>
#include <string.h>
bool
+2 -1
View File
@@ -30,7 +30,8 @@
#include "UriUtil.hxx"
#include "ASCII.hxx"
#include <assert.h>
#include <cassert>
#include <string.h>
static const char *
+1 -1
View File
@@ -36,7 +36,7 @@
#include <cstddef>
#ifndef NDEBUG
#include <assert.h>
#include <cassert>
#endif
template<typename T>