replace stddef.h with cstddef

The former is deprecated with C++14. The standard says both are the same:

The contents and meaning of the header<cstddef>are the same as the C
standard library header<stddef.h>,except that it does not declare the type
wchar_t, that it also declares the type byte and its associated
operations (21.2.5), and as noted in 21.2.3 and 21.2.4.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-03-12 16:46:28 -07:00
parent c846ee0d1b
commit 2db8bcc353
No known key found for this signature in database
GPG Key ID: 36D31CFA845F0E3B
50 changed files with 60 additions and 70 deletions

View File

@ -24,10 +24,9 @@
#include "tag/Tag.hxx"
#include "config.h"
#include <cstddef>
#include <memory>
#include <stddef.h>
class IcyMetaDataParser {
size_t data_size = 0, data_rest;

View File

@ -29,10 +29,10 @@
#include "pcm/AudioFormat.hxx"
#endif
#include <cstddef>
#include <memory>
#include <stdint.h>
#include <stddef.h>
static constexpr size_t CHUNK_SIZE = 4096;

View File

@ -31,12 +31,11 @@
#include <boost/intrusive/link_mode.hpp>
#include <boost/intrusive/list_hook.hpp>
#include <set>
#include <string>
#include <cstddef>
#include <list>
#include <memory>
#include <stddef.h>
#include <set>
#include <string>
class SocketAddress;
class UniqueSocketDescriptor;

View File

@ -24,8 +24,7 @@
#include "util/Compiler.h"
#include <cstdarg>
#include <stddef.h>
#include <cstddef>
template<typename T> struct ConstBuffer;
class Client;

View File

@ -20,7 +20,7 @@
#ifndef MPD_CONFIG_PARSER_HXX
#define MPD_CONFIG_PARSER_HXX
#include <stddef.h>
#include <cstddef>
/**
* Throws on error.

View File

@ -24,7 +24,8 @@
#include "util/DynamicFifoBuffer.hxx"
#include "util/ConstBuffer.hxx"
#include <stddef.h>
#include <cstddef>
#include <stdint.h>
class DecoderClient;

View File

@ -20,7 +20,7 @@
#ifndef MPD_OPUS_HEAD_HXX
#define MPD_OPUS_HEAD_HXX
#include <stddef.h>
#include <cstddef>
bool
ScanOpusHeader(const void *data, size_t size, unsigned &channels_r);

View File

@ -20,7 +20,7 @@
#ifndef MPD_OPUS_TAGS_HXX
#define MPD_OPUS_TAGS_HXX
#include <stddef.h>
#include <cstddef>
struct ReplayGainInfo;
class TagHandler;

View File

@ -24,8 +24,7 @@
#include "util/Compiler.h"
#include <cassert>
#include <stddef.h>
#include <cstddef>
struct AudioFormat;
struct Tag;

View File

@ -22,10 +22,10 @@
#include "PollResultGeneric.hxx"
#include <cstddef>
#include <vector>
#include <unordered_map>
#include <stddef.h>
#include <sys/poll.h>
class PollGroupPoll

View File

@ -20,10 +20,9 @@
#ifndef MPD_EVENT_POLLRESULT_GENERIC_HXX
#define MPD_EVENT_POLLRESULT_GENERIC_HXX
#include <cstddef>
#include <vector>
#include <stddef.h>
class PollResultGeneric
{
struct Item

View File

@ -24,10 +24,9 @@
#include "net/SocketDescriptor.hxx"
#include <cassert>
#include <cstddef>
#include <type_traits>
#include <stddef.h>
class EventLoop;
/**

View File

@ -21,8 +21,7 @@
#define MPD_FS_LIMITS_HXX
#include <climits>
#include <stddef.h>
#include <cstddef>
#if defined(_WIN32)
static constexpr size_t MPD_PATH_MAX = 260;

View File

@ -33,7 +33,7 @@
#include "util/Compiler.h"
#include "util/DynamicFifoBuffer.hxx"
#include <stddef.h>
#include <cstddef>
#ifdef _UNICODE
#include <wchar.h>

View File

@ -33,7 +33,7 @@
#include "util/Compiler.h"
#include "util/DynamicFifoBuffer.hxx"
#include <stddef.h>
#include <cstddef>
class Reader;

View File

@ -30,7 +30,7 @@
#ifndef OUTPUT_STREAM_HXX
#define OUTPUT_STREAM_HXX
#include <stddef.h>
#include <cstddef>
class OutputStream {
public:

View File

@ -32,7 +32,7 @@
#include "util/Compiler.h"
#include <stddef.h>
#include <cstddef>
/**
* An interface that can read bytes from a stream until the stream

View File

@ -20,7 +20,7 @@
#ifndef MPD_INPUT_CACHE_CONFIG_HXX
#define MPD_INPUT_CACHE_CONFIG_HXX
#include <stddef.h>
#include <cstddef>
struct ConfigBlock;

View File

@ -34,10 +34,9 @@
#include <jni.h>
#include <cstddef>
#include <string>
#include <stddef.h>
namespace Java {
/**
* Wrapper for a local "jstring" reference.

View File

@ -30,7 +30,7 @@
#ifndef BASE64_HXX
#define BASE64_HXX
#include <stddef.h>
#include <cstddef>
template<typename T> struct WritableBuffer;
struct StringView;

View File

@ -24,7 +24,7 @@ extern "C" {
#include <libavutil/mem.h>
}
#include <stddef.h>
#include <cstddef>
/* suppress the ffmpeg compatibility macro */
#ifdef SampleFormat

View File

@ -25,11 +25,11 @@
#include "event/DeferEvent.hxx"
#include "util/Compiler.h"
#include <string>
#include <cstddef>
#include <exception>
#include <string>
#include <stdint.h>
#include <stddef.h>
#include <sys/stat.h>
struct nfsfh;

View File

@ -22,7 +22,8 @@
#include <ogg/ogg.h>
#include <stddef.h>
#include <cstddef>
#include <stdint.h>
class Reader;

View File

@ -34,9 +34,9 @@
#include <pulse/version.h>
#include <cassert>
#include <cstddef>
#include <stdexcept>
#include <stddef.h>
#include <stdlib.h>
#define MPD_PULSE_NAME "Music Player Daemon"

View File

@ -27,10 +27,9 @@
#include <boost/intrusive/link_mode.hpp>
#include <boost/intrusive/list_hook.hpp>
#include <queue>
#include <cstddef>
#include <list>
#include <stddef.h>
#include <queue>
class UniqueSocketDescriptor;
class HttpdOutput;

View File

@ -22,9 +22,8 @@
#include "util/AllocatedArray.hxx"
#include <cstddef>
#include <memory>
#include <stddef.h>
#include <stdint.h>
/**

View File

@ -24,10 +24,9 @@
#include "pcm/ChannelDefs.hxx"
#include "util/Compiler.h"
#include <cstddef>
#include <cstdint>
#include <stddef.h>
template<size_t CAPACITY> class StringBuffer;
/**

View File

@ -34,8 +34,8 @@ or implied, of Sebastian Gesemann.
#include "ChannelDefs.hxx"
#include <array>
#include <cstddef>
#include <stddef.h>
#include <stdint.h>
/**

View File

@ -23,7 +23,7 @@
#include "SampleFormat.hxx"
#include "util/Compiler.h"
#include <stddef.h>
#include <cstddef>
class PcmDither;

View File

@ -24,8 +24,7 @@
#include <algorithm>
#include <cassert>
#include <stddef.h>
#include <cstddef>
template<typename T> struct ConstBuffer;
class PcmBuffer;

View File

@ -22,8 +22,9 @@
#include "SampleFormat.hxx"
#include <cstddef>
#include <stdint.h>
#include <stddef.h>
/**
* This template describes the specified #SampleFormat. This is an

View File

@ -27,7 +27,7 @@
#include "thread/Mutex.hxx"
#include <stddef.h>
#include <cstddef>
class InputStream;

View File

@ -27,7 +27,7 @@
#include "thread/Mutex.hxx"
#include <stddef.h>
#include <cstddef>
class InputStream;

View File

@ -38,7 +38,7 @@
#include <chrono>
#include <utility>
#include <stddef.h>
#include <cstddef>
struct tm;
template<size_t CAPACITY> class StringBuffer;

View File

@ -22,7 +22,7 @@
#include "Compiler.h"
#include <stddef.h>
#include <cstddef>
/**
* Allocate memory. Use free() to free it.

View File

@ -20,8 +20,9 @@
#ifndef MPD_BYTE_REVERSE_HXX
#define MPD_BYTE_REVERSE_HXX
#include <cstddef>
#include <stdint.h>
#include <stddef.h>
/**
* Reverse the bytes in each 16 bit "frame". This function can be

View File

@ -33,7 +33,7 @@
#include "OffsetPointer.hxx"
#include "Compiler.h"
#include <stddef.h>
#include <cstddef>
template<typename T, typename U>
constexpr T *

View File

@ -33,8 +33,7 @@
#include "WritableBuffer.hxx"
#include <cassert>
#include <stddef.h>
#include <cstddef>
/**
* A circular buffer.

View File

@ -34,7 +34,8 @@
#include "StringBuffer.hxx"
#include "Compiler.h"
#include <stddef.h>
#include <cstddef>
#include <stdint.h>
/**

View File

@ -32,10 +32,9 @@
#include "WritableBuffer.hxx"
#include <cstddef>
#include <utility>
#include <stddef.h>
#ifdef __linux__
/**

View File

@ -29,7 +29,7 @@
#pragma once
#include <stddef.h>
#include <cstddef>
/**
* Offset the given pointer by the specified number of bytes.

View File

@ -22,7 +22,8 @@
#include "Compiler.h"
#include <stddef.h>
#include <cstddef>
#include <stdint.h>
template<typename T> struct WritableBuffer;

View File

@ -32,10 +32,9 @@
#include "Compiler.h"
#include <cstddef>
#include <utility>
#include <stddef.h>
/**
* Manager for a temporary array which grows as needed. This attempts
* to reduce the number of consecutive heap allocations and

View File

@ -24,11 +24,10 @@
#include "Compiler.h"
#include <cassert>
#include <cstddef>
#include <new>
#include <utility>
#include <stddef.h>
/**
* This class pre-allocates a certain number of objects, and allows
* callers to allocate and free these objects ("slices").

View File

@ -32,7 +32,7 @@
#include "Compiler.h"
#include <stddef.h>
#include <cstddef>
/**
* Skips whitespace at the beginning of the string, and returns the

View File

@ -22,7 +22,7 @@
#include "Compiler.h"
#include <stddef.h>
#include <cstddef>
struct StringView;

View File

@ -30,7 +30,7 @@
#ifndef TEMPLATE_STRING_HXX
#define TEMPLATE_STRING_HXX
#include <stddef.h>
#include <cstddef>
namespace TemplateString {
/**

View File

@ -30,7 +30,7 @@
#ifndef TRANSFORM_N_HXX
#define TRANSFORM_N_HXX
#include <stddef.h>
#include <cstddef>
/**
* The std::transform_n() function that is missing in the C++ standard

View File

@ -32,7 +32,7 @@
#include "Compiler.h"
#include <stddef.h>
#include <cstddef>
/**
* Copy a string. If the buffer is too small, then the string is

View File

@ -33,7 +33,7 @@
#include "Compiler.h"
#include <stddef.h>
#include <cstddef>
/**
* Is this a valid UTF-8 string?