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
50 changed files with 60 additions and 70 deletions

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?