replace stdint.h with cstdint

The former is deprecated by C++14. The standard says they are the same:

The header defines all types and macros the same as the C standard library
header<stdint.h>.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2020-03-12 17:08:53 -07:00
parent 2db8bcc353
commit a2f5a63bbc
No known key found for this signature in database
GPG Key ID: 36D31CFA845F0E3B
85 changed files with 88 additions and 113 deletions

View File

@ -30,10 +30,9 @@
#endif
#include <cstddef>
#include <cstdint>
#include <memory>
#include <stdint.h>
static constexpr size_t CHUNK_SIZE = 4096;
struct AudioFormat;

View File

@ -20,7 +20,7 @@
#ifndef MPD_PLAYLIST_PRINT_HXX
#define MPD_PLAYLIST_PRINT_HXX
#include <stdint.h>
#include <cstdint>
struct playlist;
class SongFilter;

View File

@ -22,7 +22,7 @@
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
enum class ReplayGainMode : uint8_t {
OFF,

View File

@ -22,7 +22,7 @@
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
enum class SingleMode : uint8_t {
OFF,

View File

@ -20,7 +20,7 @@
#ifndef MPD_TAG_PRINT_HXX
#define MPD_TAG_PRINT_HXX
#include <stdint.h>
#include <cstdint>
enum TagType : uint8_t;

View File

@ -22,7 +22,7 @@
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
enum TagType : uint8_t;
struct Partition;

View File

@ -20,7 +20,7 @@
#ifndef MPD_DB_PRINT_H
#define MPD_DB_PRINT_H
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;
enum TagType : uint8_t;

View File

@ -26,9 +26,9 @@
#include <cerrno>
#include <climits>
#include <cstdint>
#include <sys/inotify.h>
#include <stdint.h>
bool
InotifySource::OnSocketReady(gcc_unused unsigned flags) noexcept

View File

@ -25,7 +25,7 @@
#include "input/Ptr.hxx"
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
struct AudioFormat;
struct Tag;

View File

@ -20,7 +20,7 @@
#ifndef MPD_DECODER_COMMAND_HXX
#define MPD_DECODER_COMMAND_HXX
#include <stdint.h>
#include <cstdint>
enum class DecoderCommand : uint8_t {
NONE = 0,

View File

@ -32,12 +32,11 @@
#include "ReplayGainMode.hxx"
#include <cassert>
#include <cstdint>
#include <exception>
#include <memory>
#include <utility>
#include <stdint.h>
/* damn you, windows.h! */
#ifdef ERROR
#undef ERROR

View File

@ -42,7 +42,7 @@
// IWYU pragma: end_exports
#include <stdint.h>
#include <cstdint>
/**
* Throw an instance of this class to stop decoding the current song

View File

@ -25,8 +25,7 @@
#include "util/ConstBuffer.hxx"
#include <cstddef>
#include <stdint.h>
#include <cstdint>
class DecoderClient;
class InputStream;

View File

@ -24,7 +24,7 @@
#include "input/Offset.hxx"
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
class TagHandler;
class DecoderClient;

View File

@ -24,7 +24,7 @@ extern "C" {
#include "libavformat/avio.h"
}
#include <stdint.h>
#include <cstdint>
class DecoderClient;
class InputStream;

View File

@ -19,7 +19,7 @@
#include "OpusHead.hxx"
#include <stdint.h>
#include <cstdint>
struct OpusHead {
char signature[8];

View File

@ -23,8 +23,8 @@
#include "util/StringView.hxx"
#include <algorithm>
#include <cstdint>
#include <stdint.h>
#include <string.h>
class OpusReader {

View File

@ -28,7 +28,7 @@
#include "util/NumberParser.hxx"
#include "util/StringView.hxx"
#include <stdint.h>
#include <cstdint>
gcc_pure
static TagType

View File

@ -24,10 +24,9 @@
#include "util/StaticFifoBuffer.hxx"
#include <cassert>
#include <cstdint>
#include <exception>
#include <stdint.h>
class EventLoop;
/**

View File

@ -53,10 +53,10 @@
#include "util/WritableBuffer.hxx"
#include <array>
#include <cstdint>
#include <stdexcept>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
class RouteFilter final : public Filter {

View File

@ -30,8 +30,7 @@
#endif
#include <chrono>
#include <stdint.h>
#include <cstdint>
class FileInfo {
friend bool GetFileInfo(Path path, FileInfo &info,

View File

@ -31,9 +31,9 @@
#include "Reader.hxx"
#include "util/TextFile.hxx"
#include <cstdint>
#include <stdexcept>
#include <stdint.h>
#include <string.h>
bool

View File

@ -39,8 +39,7 @@
#endif
#include <cassert>
#include <stdint.h>
#include <cstdint>
#ifdef _WIN32
#include <windows.h>

View File

@ -22,7 +22,7 @@
#include "Reader.hxx"
#include <stdint.h>
#include <cstdint>
/**
* A filter that allows the caller to peek the first few bytes without

View File

@ -20,7 +20,7 @@
#ifndef MPD_OFFSET_HXX
#define MPD_OFFSET_HXX
#include <stdint.h>
#include <cstdint>
/**
* A type for absolute offsets in a file.

View File

@ -27,10 +27,9 @@
#include "util/CircularBuffer.hxx"
#include <cassert>
#include <cstdint>
#include <exception>
#include <stdint.h>
/**
* Helper class for moving InputStream implementations with blocking
* backend library implementation to a dedicated thread. Data is

View File

@ -35,9 +35,9 @@
#include "config/Block.hxx"
#include <cassert>
#include <cstdint>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>

View File

@ -24,8 +24,7 @@
#include <algorithm>
#include <cassert>
#include <stdint.h>
#include <cstdint>
namespace Alsa {

View File

@ -22,7 +22,7 @@
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
static constexpr uint_least32_t
MakeAlsaVersion(uint_least32_t major, uint_least32_t minor,

View File

@ -24,11 +24,10 @@
#include "decoder/Client.hxx"
#include "thread/Mutex.hxx"
#include <cstdint>
#include <exception>
#include <memory>
#include <stdint.h>
class PcmConvert;
class ChromaprintDecoderClient : public DecoderClient {

View File

@ -34,8 +34,7 @@
#include "util/Compiler.h"
#include <array>
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;

View File

@ -29,8 +29,7 @@ extern "C" {
}
#include <cassert>
#include <stdint.h>
#include <cstdint>
/* suppress the ffmpeg compatibility macro */
#ifdef SampleFormat

View File

@ -34,8 +34,7 @@
#include "util/Compiler.h"
#include <array>
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;

View File

@ -26,10 +26,10 @@
#include "util/Compiler.h"
#include <cstddef>
#include <cstdint>
#include <exception>
#include <string>
#include <stdint.h>
#include <sys/stat.h>
struct nfsfh;

View File

@ -23,9 +23,9 @@
#include <ogg/ogg.h>
#include <cassert>
#include <cstdint>
#include <string.h>
#include <stdint.h>
static size_t
ReadPage(const ogg_page &page, void *_buffer, size_t size) noexcept

View File

@ -23,9 +23,9 @@
#include <ogg/ogg.h>
#include <cassert>
#include <cstdint>
#include <string.h>
#include <stdint.h>
class OggStreamState {
ogg_stream_state state;

View File

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

View File

@ -33,7 +33,7 @@
#include "SocketAddress.hxx"
#include "util/ByteOrder.hxx"
#include <stdint.h>
#include <cstdint>
#ifdef _WIN32
#include <winsock2.h>

View File

@ -34,7 +34,7 @@
#include "util/ByteOrder.hxx"
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
#ifdef _WIN32
#include <winsock2.h>

View File

@ -28,12 +28,11 @@
#include "system/PeriodClock.hxx"
#include "util/Compiler.h"
#include <cstdint>
#include <exception>
#include <map>
#include <memory>
#include <string>
#include <map>
#include <stdint.h>
enum class ReplayGainMode : uint8_t;
struct FilteredAudioOutput;

View File

@ -29,11 +29,10 @@
#include "util/ConstBuffer.hxx"
#include <cassert>
#include <cstdint>
#include <memory>
#include <utility>
#include <stdint.h>
struct MusicChunk;
struct Tag;
class Filter;

View File

@ -23,8 +23,8 @@
#include "util/AllocatedArray.hxx"
#include <cstddef>
#include <cstdint>
#include <memory>
#include <stdint.h>
/**
* A dynamically allocated buffer. It is used to pass

View File

@ -23,7 +23,7 @@
#include "util/ReusableArray.hxx"
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
/**
* Manager for a temporary buffer which grows as needed. We could

View File

@ -22,10 +22,9 @@
#include "util/Compiler.h"
#include <cstdint>
#include <limits>
#include <stdint.h>
enum class SampleFormat : uint8_t;
template<SampleFormat F> struct SampleTraits;

View File

@ -20,7 +20,7 @@
#ifndef MPD_PCM_DITHER_HXX
#define MPD_PCM_DITHER_HXX
#include <stdint.h>
#include <cstdint>
enum class SampleFormat : uint8_t;

View File

@ -23,7 +23,7 @@
#include "Buffer.hxx"
#include "RestBuffer.hxx"
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;

View File

@ -23,7 +23,7 @@
#include "Buffer.hxx"
#include "RestBuffer.hxx"
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;

View File

@ -35,8 +35,7 @@ or implied, of Sebastian Gesemann.
#include <array>
#include <cstddef>
#include <stdint.h>
#include <cstdint>
/**
* A "dsd2pcm engine" for one channel.

View File

@ -23,7 +23,7 @@
#include "Buffer.hxx"
#include "RestBuffer.hxx"
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;

View File

@ -30,7 +30,7 @@
#include "Dop.hxx"
#endif
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;

View File

@ -23,7 +23,7 @@
#include "util/Compiler.h"
#include "util/ConstBuffer.hxx"
#include <stdint.h>
#include <cstdint>
/**
* Interleave planar PCM samples from #src to #dest.

View File

@ -25,7 +25,7 @@
#ifndef PCM_PACK_HXX
#define PCM_PACK_HXX
#include <stdint.h>
#include <cstdint>
/**
* Converts padded 24 bit samples (4 bytes per sample) to packed 24

View File

@ -20,7 +20,7 @@
#ifndef MPD_PCM_CHANNELS_HXX
#define MPD_PCM_CHANNELS_HXX
#include <stdint.h>
#include <cstdint>
class PcmBuffer;
template<typename T> struct ConstBuffer;

View File

@ -23,7 +23,7 @@
#include "Buffer.hxx"
#include "Dsd2Pcm.hxx"
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;

View File

@ -22,7 +22,7 @@
#include "SampleFormat.hxx"
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;
class PcmBuffer;

View File

@ -22,7 +22,7 @@
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
#if defined(_WIN32)
/* on WIN32, "FLOAT" is already defined, and this triggers -Wshadow */

View File

@ -20,7 +20,7 @@
#ifndef MPD_PCM_SILENCE_HXX
#define MPD_PCM_SILENCE_HXX
#include <stdint.h>
#include <cstdint>
template<typename T> struct WritableBuffer;
enum class SampleFormat : uint8_t;

View File

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

View File

@ -28,8 +28,8 @@
#include "Dither.cxx" // including the .cxx file to get inlined templates
#include <cassert>
#include <cstdint>
#include <stdint.h>
#include <string.h>
#if GCC_OLDER_THAN(8,0)

View File

@ -31,11 +31,10 @@
#include "ReplayGainMode.hxx"
#include "MusicChunkPtr.hxx"
#include <cstdint>
#include <exception>
#include <memory>
#include <stdint.h>
struct Tag;
class PlayerListener;
class PlayerOutputs;

View File

@ -20,7 +20,7 @@
#ifndef MPD_PROTOCOL_ARGPARSER_HXX
#define MPD_PROTOCOL_ARGPARSER_HXX
#include <stdint.h>
#include <cstdint>
struct RangeArg;
class SongTime;

View File

@ -26,10 +26,9 @@
#include "util/LazyRandomEngine.hxx"
#include <cassert>
#include <cstdint>
#include <utility>
#include <stdint.h>
class DetachedSong;
/**

View File

@ -25,7 +25,7 @@
#ifndef MPD_QUEUE_PRINT_HXX
#define MPD_QUEUE_PRINT_HXX
#include <stdint.h>
#include <cstdint>
struct Queue;
class SongFilter;

View File

@ -23,10 +23,9 @@
#include "AndSongFilter.hxx"
#include "util/Compiler.h"
#include <cstdint>
#include <string>
#include <stdint.h>
/**
* Special value for the db_selection_print() sort parameter.
*/

View File

@ -23,7 +23,7 @@
#include "ISongFilter.hxx"
#include "StringFilter.hxx"
#include <stdint.h>
#include <cstdint>
enum TagType : uint8_t;
struct Tag;

View File

@ -22,7 +22,7 @@
#include <chrono>
#include <stdint.h>
#include <cstdint>
struct StorageFileInfo {
enum class Type : uint8_t {

View File

@ -32,8 +32,9 @@
#include "UniqueFileDescriptor.hxx"
#include <cstdint>
#include <sys/epoll.h>
#include <stdint.h>
/**
* A class that wraps Linux epoll.

View File

@ -31,8 +31,8 @@
#include "system/Error.hxx"
#include <cassert>
#include <cstdint>
#include <stdint.h>
#include <sys/stat.h>
#include <fcntl.h>

View File

@ -21,10 +21,10 @@
#include "input/InputStream.hxx"
#include "util/ByteOrder.hxx"
#include <cstdint>
#include <limits>
#include <stdexcept>
#include <stdint.h>
#include <string.h>
struct aiff_header {

View File

@ -23,9 +23,9 @@
#include "util/StringView.hxx"
#include <cassert>
#include <cstdint>
#include <memory>
#include <stdint.h>
#include <string.h>
struct ApeFooter {

View File

@ -23,10 +23,9 @@
#include "util/ConstBuffer.hxx"
#include "util/StringView.hxx"
#include <cstdint>
#include <string>
#include <stdint.h>
static StringView
ReadString(ConstBuffer<uint8_t> &src) noexcept
{

View File

@ -22,7 +22,7 @@
#include "Type.h"
#include <stdint.h>
#include <cstdint>
class TagMask {
typedef uint_least32_t mask_t;

View File

@ -24,11 +24,11 @@
#include "util/StringView.hxx"
#include <cassert>
#include <cstdint>
#include <limits>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
Mutex tag_pool_lock;

View File

@ -21,10 +21,10 @@
#include "input/InputStream.hxx"
#include "util/ByteOrder.hxx"
#include <cstdint>
#include <limits>
#include <stdexcept>
#include <stdint.h>
#include <string.h>
struct riff_header {

View File

@ -22,7 +22,8 @@
#include <id3tag.h>
#include <stdint.h>
#include <cstdint>
#include <string.h>
enum class Rva2Channel : uint8_t {

View File

@ -21,7 +21,7 @@
#define MPD_TAG_TYPE_H
#ifdef __cplusplus
#include <stdint.h>
#include <cstdint>
#endif
/**

View File

@ -33,8 +33,7 @@
#include <fileapi.h>
#include <chrono>
#include <stdint.h>
#include <cstdint>
constexpr uint64_t
ConstructUint64(DWORD lo, DWORD hi) noexcept

View File

@ -22,7 +22,7 @@
#include "Compiler.h"
#include <stdint.h>
#include <cstdint>
/**
* @see http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64BitsDiv

View File

@ -32,7 +32,7 @@
#include "Compiler.h"
#include <stdint.h>
#include <cstdint>
#if defined(__i386__) || defined(__x86_64__) || defined(__ARMEL__)
/* well-known little-endian */

View File

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

View File

@ -35,8 +35,7 @@
#include "Compiler.h"
#include <cstddef>
#include <stdint.h>
#include <cstdint>
/**
* Format the given byte sequence into a null-terminated hexadecimal

View File

@ -103,7 +103,7 @@ HugeDiscard(void *p, size_t size) noexcept
/* not Linux: fall back to standard C calls */
#include <stdint.h>
#include <cstdint>
static inline WritableBuffer<void>
HugeAllocate(size_t size)

View File

@ -32,8 +32,8 @@
#define NUMBER_PARSER_HXX
#include <cassert>
#include <cstdint>
#include <stdint.h>
#include <stdlib.h>
struct StringView;

View File

@ -23,8 +23,7 @@
#include "Compiler.h"
#include <cstddef>
#include <stdint.h>
#include <cstdint>
template<typename T> struct WritableBuffer;
template<typename T> class DynamicFifoBuffer;

View File

@ -32,8 +32,7 @@
#include "CharUtil.hxx"
#include <algorithm>
#include <stdint.h>
#include <cstdint>
/**
* Is this a leading byte that is followed by 1 continuation byte?