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: 's avatarRosen Penev <rosenp@gmail.com>
parent 2db8bcc3
......@@ -30,10 +30,9 @@
#endif
#include <cstddef>
#include <cstdint>
#include <memory>
#include <stdint.h>
static constexpr size_t CHUNK_SIZE = 4096;
struct AudioFormat;
......
......@@ -20,7 +20,7 @@
#ifndef MPD_PLAYLIST_PRINT_HXX
#define MPD_PLAYLIST_PRINT_HXX
#include <stdint.h>
#include <cstdint>
struct playlist;
class SongFilter;
......
......@@ -22,7 +22,7 @@
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
enum class ReplayGainMode : uint8_t {
OFF,
......
......@@ -22,7 +22,7 @@
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
enum class SingleMode : uint8_t {
OFF,
......
......@@ -20,7 +20,7 @@
#ifndef MPD_TAG_PRINT_HXX
#define MPD_TAG_PRINT_HXX
#include <stdint.h>
#include <cstdint>
enum TagType : uint8_t;
......
......@@ -22,7 +22,7 @@
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
enum TagType : uint8_t;
struct Partition;
......
......@@ -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;
......
......@@ -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
......
......@@ -25,7 +25,7 @@
#include "input/Ptr.hxx"
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
struct AudioFormat;
struct Tag;
......
......@@ -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,
......
......@@ -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
......
......@@ -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
......
......@@ -25,8 +25,7 @@
#include "util/ConstBuffer.hxx"
#include <cstddef>
#include <stdint.h>
#include <cstdint>
class DecoderClient;
class InputStream;
......
......@@ -24,7 +24,7 @@
#include "input/Offset.hxx"
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
class TagHandler;
class DecoderClient;
......
......@@ -24,7 +24,7 @@ extern "C" {
#include "libavformat/avio.h"
}
#include <stdint.h>
#include <cstdint>
class DecoderClient;
class InputStream;
......
......@@ -19,7 +19,7 @@
#include "OpusHead.hxx"
#include <stdint.h>
#include <cstdint>
struct OpusHead {
char signature[8];
......
......@@ -23,8 +23,8 @@
#include "util/StringView.hxx"
#include <algorithm>
#include <cstdint>
#include <stdint.h>
#include <string.h>
class OpusReader {
......
......@@ -28,7 +28,7 @@
#include "util/NumberParser.hxx"
#include "util/StringView.hxx"
#include <stdint.h>
#include <cstdint>
gcc_pure
static TagType
......
......@@ -24,10 +24,9 @@
#include "util/StaticFifoBuffer.hxx"
#include <cassert>
#include <cstdint>
#include <exception>
#include <stdint.h>
class EventLoop;
/**
......
......@@ -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 {
......
......@@ -30,8 +30,7 @@
#endif
#include <chrono>
#include <stdint.h>
#include <cstdint>
class FileInfo {
friend bool GetFileInfo(Path path, FileInfo &info,
......
......@@ -31,9 +31,9 @@
#include "Reader.hxx"
#include "util/TextFile.hxx"
#include <cstdint>
#include <stdexcept>
#include <stdint.h>
#include <string.h>
bool
......
......@@ -39,8 +39,7 @@
#endif
#include <cassert>
#include <stdint.h>
#include <cstdint>
#ifdef _WIN32
#include <windows.h>
......
......@@ -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
......
......@@ -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.
......
......@@ -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
......
......@@ -35,9 +35,9 @@
#include "config/Block.hxx"
#include <cassert>
#include <cstdint>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
......
......@@ -24,8 +24,7 @@
#include <algorithm>
#include <cassert>
#include <stdint.h>
#include <cstdint>
namespace Alsa {
......
......@@ -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,
......
......@@ -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 {
......
......@@ -34,8 +34,7 @@
#include "util/Compiler.h"
#include <array>
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;
......
......@@ -29,8 +29,7 @@ extern "C" {
}
#include <cassert>
#include <stdint.h>
#include <cstdint>
/* suppress the ffmpeg compatibility macro */
#ifdef SampleFormat
......
......@@ -34,8 +34,7 @@
#include "util/Compiler.h"
#include <array>
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;
......
......@@ -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;
......
......@@ -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
......
......@@ -23,9 +23,9 @@
#include <ogg/ogg.h>
#include <cassert>
#include <cstdint>
#include <string.h>
#include <stdint.h>
class OggStreamState {
ogg_stream_state state;
......
......@@ -23,8 +23,7 @@
#include <ogg/ogg.h>
#include <cstddef>
#include <stdint.h>
#include <cstdint>
class Reader;
......
......@@ -33,7 +33,7 @@
#include "SocketAddress.hxx"
#include "util/ByteOrder.hxx"
#include <stdint.h>
#include <cstdint>
#ifdef _WIN32
#include <winsock2.h>
......
......@@ -34,7 +34,7 @@
#include "util/ByteOrder.hxx"
#include "util/Compiler.h"
#include <stdint.h>
#include <cstdint>
#ifdef _WIN32
#include <winsock2.h>
......
......@@ -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;
......
......@@ -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;
......
......@@ -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
......
......@@ -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
......
......@@ -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;
......
......@@ -20,7 +20,7 @@
#ifndef MPD_PCM_DITHER_HXX
#define MPD_PCM_DITHER_HXX
#include <stdint.h>
#include <cstdint>
enum class SampleFormat : uint8_t;
......
......@@ -23,7 +23,7 @@
#include "Buffer.hxx"
#include "RestBuffer.hxx"
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;
......
......@@ -23,7 +23,7 @@
#include "Buffer.hxx"
#include "RestBuffer.hxx"
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;
......
......@@ -35,8 +35,7 @@ or implied, of Sebastian Gesemann.
#include <array>
#include <cstddef>
#include <stdint.h>
#include <cstdint>
/**
* A "dsd2pcm engine" for one channel.
......
......@@ -23,7 +23,7 @@
#include "Buffer.hxx"
#include "RestBuffer.hxx"
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;
......
......@@ -30,7 +30,7 @@
#include "Dop.hxx"
#endif
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;
......
......@@ -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.
......
......@@ -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
......
......@@ -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;
......
......@@ -23,7 +23,7 @@
#include "Buffer.hxx"
#include "Dsd2Pcm.hxx"
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;
......
......@@ -22,7 +22,7 @@
#include "SampleFormat.hxx"
#include <stdint.h>
#include <cstdint>
template<typename T> struct ConstBuffer;
class PcmBuffer;
......
......@@ -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 */
......
......@@ -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;
......
......@@ -23,8 +23,7 @@
#include "SampleFormat.hxx"
#include <cstddef>
#include <stdint.h>
#include <cstdint>
/**
* This template describes the specified #SampleFormat. This is an
......
......@@ -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)
......
......@@ -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;
......
......@@ -20,7 +20,7 @@
#ifndef MPD_PROTOCOL_ARGPARSER_HXX
#define MPD_PROTOCOL_ARGPARSER_HXX
#include <stdint.h>
#include <cstdint>
struct RangeArg;
class SongTime;
......
......@@ -26,10 +26,9 @@
#include "util/LazyRandomEngine.hxx"
#include <cassert>
#include <cstdint>
#include <utility>
#include <stdint.h>
class DetachedSong;
/**
......
......@@ -25,7 +25,7 @@
#ifndef MPD_QUEUE_PRINT_HXX
#define MPD_QUEUE_PRINT_HXX
#include <stdint.h>
#include <cstdint>
struct Queue;
class SongFilter;
......
......@@ -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.
*/
......
......@@ -23,7 +23,7 @@
#include "ISongFilter.hxx"
#include "StringFilter.hxx"
#include <stdint.h>
#include <cstdint>
enum TagType : uint8_t;
struct Tag;
......
......@@ -22,7 +22,7 @@
#include <chrono>
#include <stdint.h>
#include <cstdint>
struct StorageFileInfo {
enum class Type : uint8_t {
......
......@@ -32,8 +32,9 @@
#include "UniqueFileDescriptor.hxx"
#include <cstdint>
#include <sys/epoll.h>
#include <stdint.h>
/**
* A class that wraps Linux epoll.
......
......@@ -31,8 +31,8 @@
#include "system/Error.hxx"
#include <cassert>
#include <cstdint>
#include <stdint.h>
#include <sys/stat.h>
#include <fcntl.h>
......
......@@ -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 {
......
......@@ -23,9 +23,9 @@
#include "util/StringView.hxx"
#include <cassert>
#include <cstdint>
#include <memory>
#include <stdint.h>
#include <string.h>
struct ApeFooter {
......
......@@ -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
{
......
......@@ -22,7 +22,7 @@
#include "Type.h"
#include <stdint.h>
#include <cstdint>
class TagMask {
typedef uint_least32_t mask_t;
......
......@@ -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;
......
......@@ -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 {
......
......@@ -22,7 +22,8 @@
#include <id3tag.h>
#include <stdint.h>
#include <cstdint>
#include <string.h>
enum class Rva2Channel : uint8_t {
......
......@@ -21,7 +21,7 @@
#define MPD_TAG_TYPE_H
#ifdef __cplusplus
#include <stdint.h>
#include <cstdint>
#endif
/**
......
......@@ -33,8 +33,7 @@
#include <fileapi.h>
#include <chrono>
#include <stdint.h>
#include <cstdint>
constexpr uint64_t
ConstructUint64(DWORD lo, DWORD hi) noexcept
......
......@@ -22,7 +22,7 @@
#include "Compiler.h"
#include <stdint.h>
#include <cstdint>
/**
* @see http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64BitsDiv
......
......@@ -32,7 +32,7 @@
#include "Compiler.h"
#include <stdint.h>
#include <cstdint>
#if defined(__i386__) || defined(__x86_64__) || defined(__ARMEL__)
/* well-known little-endian */
......
......@@ -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
......
......@@ -35,8 +35,7 @@
#include "Compiler.h"
#include <cstddef>
#include <stdint.h>
#include <cstdint>
/**
* Format the given byte sequence into a null-terminated hexadecimal
......
......@@ -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)
......
......@@ -32,8 +32,8 @@
#define NUMBER_PARSER_HXX
#include <cassert>
#include <cstdint>
#include <stdint.h>
#include <stdlib.h>
struct StringView;
......
......@@ -23,8 +23,7 @@
#include "Compiler.h"
#include <cstddef>
#include <stdint.h>
#include <cstdint>
template<typename T> struct WritableBuffer;
template<typename T> class DynamicFifoBuffer;
......
......@@ -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?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment