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:
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "Compiler.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
/**
|
||||
* Allocate memory. Use free() to free it.
|
||||
|
@@ -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
|
||||
|
@@ -33,7 +33,7 @@
|
||||
#include "OffsetPointer.hxx"
|
||||
#include "Compiler.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
template<typename T, typename U>
|
||||
constexpr T *
|
||||
|
@@ -33,8 +33,7 @@
|
||||
#include "WritableBuffer.hxx"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
/**
|
||||
* A circular buffer.
|
||||
|
@@ -34,7 +34,8 @@
|
||||
#include "StringBuffer.hxx"
|
||||
#include "Compiler.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
/**
|
||||
|
@@ -32,10 +32,9 @@
|
||||
|
||||
#include "WritableBuffer.hxx"
|
||||
|
||||
#include <cstddef>
|
||||
#include <utility>
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#ifdef __linux__
|
||||
|
||||
/**
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
/**
|
||||
* Offset the given pointer by the specified number of bytes.
|
||||
|
@@ -22,7 +22,8 @@
|
||||
|
||||
#include "Compiler.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
template<typename T> struct WritableBuffer;
|
||||
|
@@ -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
|
||||
|
@@ -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").
|
||||
|
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "Compiler.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
/**
|
||||
* Skips whitespace at the beginning of the string, and returns the
|
||||
|
@@ -22,7 +22,7 @@
|
||||
|
||||
#include "Compiler.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
struct StringView;
|
||||
|
||||
|
@@ -30,7 +30,7 @@
|
||||
#ifndef TEMPLATE_STRING_HXX
|
||||
#define TEMPLATE_STRING_HXX
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
namespace TemplateString {
|
||||
/**
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "Compiler.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
/**
|
||||
* Is this a valid UTF-8 string?
|
||||
|
Reference in New Issue
Block a user