diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-03-12 17:08:53 -0700 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2020-03-12 19:04:39 -0700 |
commit | a2f5a63bbc1a21be672d358a107a3a206c0c5369 (patch) | |
tree | 7d2bea6fdbaa44d80db0f8dba2851c2de92d768e /src | |
parent | 2db8bcc353ce4360a6dbe4c73afcaae1c27fce43 (diff) |
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>
Diffstat (limited to 'src')
85 files changed, 88 insertions, 113 deletions
diff --git a/src/MusicChunk.hxx b/src/MusicChunk.hxx index 595233836..65f5c7a96 100644 --- a/src/MusicChunk.hxx +++ b/src/MusicChunk.hxx @@ -30,10 +30,9 @@ #endif #include <cstddef> +#include <cstdint> #include <memory> -#include <stdint.h> - static constexpr size_t CHUNK_SIZE = 4096; struct AudioFormat; diff --git a/src/PlaylistPrint.hxx b/src/PlaylistPrint.hxx index 051336049..bc911f33f 100644 --- a/src/PlaylistPrint.hxx +++ b/src/PlaylistPrint.hxx @@ -20,7 +20,7 @@ #ifndef MPD_PLAYLIST_PRINT_HXX #define MPD_PLAYLIST_PRINT_HXX -#include <stdint.h> +#include <cstdint> struct playlist; class SongFilter; diff --git a/src/ReplayGainMode.hxx b/src/ReplayGainMode.hxx index 5fc06534e..c08de95e0 100644 --- a/src/ReplayGainMode.hxx +++ b/src/ReplayGainMode.hxx @@ -22,7 +22,7 @@ #include "util/Compiler.h" -#include <stdint.h> +#include <cstdint> enum class ReplayGainMode : uint8_t { OFF, diff --git a/src/SingleMode.hxx b/src/SingleMode.hxx index b3ddd73f1..afa41e361 100644 --- a/src/SingleMode.hxx +++ b/src/SingleMode.hxx @@ -22,7 +22,7 @@ #include "util/Compiler.h" -#include <stdint.h> +#include <cstdint> enum class SingleMode : uint8_t { OFF, diff --git a/src/TagPrint.hxx b/src/TagPrint.hxx index e52212cc4..ff0b879e9 100644 --- a/src/TagPrint.hxx +++ b/src/TagPrint.hxx @@ -20,7 +20,7 @@ #ifndef MPD_TAG_PRINT_HXX #define MPD_TAG_PRINT_HXX -#include <stdint.h> +#include <cstdint> enum TagType : uint8_t; diff --git a/src/db/Count.hxx b/src/db/Count.hxx index 46a7a40b7..405cf018f 100644 --- a/src/db/Count.hxx +++ b/src/db/Count.hxx @@ -22,7 +22,7 @@ #include "util/Compiler.h" -#include <stdint.h> +#include <cstdint> enum TagType : uint8_t; struct Partition; diff --git a/src/db/DatabasePrint.hxx b/src/db/DatabasePrint.hxx index 1330875a9..4f0202ddc 100644 --- a/src/db/DatabasePrint.hxx +++ b/src/db/DatabasePrint.hxx @@ -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; diff --git a/src/db/update/InotifySource.cxx b/src/db/update/InotifySource.cxx index 9952374bc..d45764f24 100644 --- a/src/db/update/InotifySource.cxx +++ b/src/db/update/InotifySource.cxx @@ -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 diff --git a/src/decoder/Client.hxx b/src/decoder/Client.hxx index 32e7826d6..41f78fe2b 100644 --- a/src/decoder/Client.hxx +++ b/src/decoder/Client.hxx @@ -25,7 +25,7 @@ #include "input/Ptr.hxx" #include "util/Compiler.h" -#include <stdint.h> +#include <cstdint> struct AudioFormat; struct Tag; diff --git a/src/decoder/Command.hxx b/src/decoder/Command.hxx index e7c984ae4..9297139e1 100644 --- a/src/decoder/Command.hxx +++ b/src/decoder/Command.hxx @@ -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, diff --git a/src/decoder/Control.hxx b/src/decoder/Control.hxx index f523a306c..432ee4a4a 100644 --- a/src/decoder/Control.hxx +++ b/src/decoder/Control.hxx @@ -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 diff --git a/src/decoder/DecoderAPI.hxx b/src/decoder/DecoderAPI.hxx index f8bd2c510..058f3ea55 100644 --- a/src/decoder/DecoderAPI.hxx +++ b/src/decoder/DecoderAPI.hxx @@ -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 diff --git a/src/decoder/DecoderBuffer.hxx b/src/decoder/DecoderBuffer.hxx index 8040e9641..5b2bc90a4 100644 --- a/src/decoder/DecoderBuffer.hxx +++ b/src/decoder/DecoderBuffer.hxx @@ -25,8 +25,7 @@ #include "util/ConstBuffer.hxx" #include <cstddef> - -#include <stdint.h> +#include <cstdint> class DecoderClient; class InputStream; diff --git a/src/decoder/plugins/DsdLib.hxx b/src/decoder/plugins/DsdLib.hxx index 8b3d07774..dd7f57806 100644 --- a/src/decoder/plugins/DsdLib.hxx +++ b/src/decoder/plugins/DsdLib.hxx @@ -24,7 +24,7 @@ #include "input/Offset.hxx" #include "util/Compiler.h" -#include <stdint.h> +#include <cstdint> class TagHandler; class DecoderClient; diff --git a/src/decoder/plugins/FfmpegIo.hxx b/src/decoder/plugins/FfmpegIo.hxx index 61216948f..8f94b1abf 100644 --- a/src/decoder/plugins/FfmpegIo.hxx +++ b/src/decoder/plugins/FfmpegIo.hxx @@ -24,7 +24,7 @@ extern "C" { #include "libavformat/avio.h" } -#include <stdint.h> +#include <cstdint> class DecoderClient; class InputStream; diff --git a/src/decoder/plugins/OpusHead.cxx b/src/decoder/plugins/OpusHead.cxx index eddf05b73..9d302770a 100644 --- a/src/decoder/plugins/OpusHead.cxx +++ b/src/decoder/plugins/OpusHead.cxx @@ -19,7 +19,7 @@ #include "OpusHead.hxx" -#include <stdint.h> +#include <cstdint> struct OpusHead { char signature[8]; diff --git a/src/decoder/plugins/OpusReader.hxx b/src/decoder/plugins/OpusReader.hxx index f95302aaa..6bcde3648 100644 --- a/src/decoder/plugins/OpusReader.hxx +++ b/src/decoder/plugins/OpusReader.hxx @@ -23,8 +23,8 @@ #include "util/StringView.hxx" #include <algorithm> +#include <cstdint> -#include <stdint.h> #include <string.h> class OpusReader { diff --git a/src/decoder/plugins/OpusTags.cxx b/src/decoder/plugins/OpusTags.cxx index a8e17b944..eea1fbe9b 100644 --- a/src/decoder/plugins/OpusTags.cxx +++ b/src/decoder/plugins/OpusTags.cxx @@ -28,7 +28,7 @@ #include "util/NumberParser.hxx" #include "util/StringView.hxx" -#include <stdint.h> +#include <cstdint> gcc_pure static TagType diff --git a/src/event/BufferedSocket.hxx b/src/event/BufferedSocket.hxx index e1944bfbf..484ea9b5b 100644 --- a/src/event/BufferedSocket.hxx +++ b/src/event/BufferedSocket.hxx @@ -24,10 +24,9 @@ #include "util/StaticFifoBuffer.hxx" #include <cassert> +#include <cstdint> #include <exception> -#include <stdint.h> - class EventLoop; /** diff --git a/src/filter/plugins/RouteFilterPlugin.cxx b/src/filter/plugins/RouteFilterPlugin.cxx index 66fac1e1a..1969095fc 100644 --- a/src/filter/plugins/RouteFilterPlugin.cxx +++ b/src/filter/plugins/RouteFilterPlugin.cxx @@ -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 { diff --git a/src/fs/FileInfo.hxx b/src/fs/FileInfo.hxx index 9e2a31a53..ac7f2f198 100644 --- a/src/fs/FileInfo.hxx +++ b/src/fs/FileInfo.hxx @@ -30,8 +30,7 @@ #endif #include <chrono> - -#include <stdint.h> +#include <cstdint> class FileInfo { friend bool GetFileInfo(Path path, FileInfo &info, diff --git a/src/fs/io/BufferedReader.cxx b/src/fs/io/BufferedReader.cxx index ef7b8510a..4a67af42c 100644 --- a/src/fs/io/BufferedReader.cxx +++ b/src/fs/io/BufferedReader.cxx @@ -31,9 +31,9 @@ #include "Reader.hxx" #include "util/TextFile.hxx" +#include <cstdint> #include <stdexcept> -#include <stdint.h> #include <string.h> bool diff --git a/src/fs/io/FileOutputStream.hxx b/src/fs/io/FileOutputStream.hxx index 4b378dc8e..503c6e508 100644 --- a/src/fs/io/FileOutputStream.hxx +++ b/src/fs/io/FileOutputStream.hxx @@ -39,8 +39,7 @@ #endif #include <cassert> - -#include <stdint.h> +#include <cstdint> #ifdef _WIN32 #include <windows.h> diff --git a/src/fs/io/PeekReader.hxx b/src/fs/io/PeekReader.hxx index e0b355a89..378c1d7d6 100644 --- a/src/fs/io/PeekReader.hxx +++ b/src/fs/io/PeekReader.hxx @@ -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 diff --git a/src/input/Offset.hxx b/src/input/Offset.hxx index 693d33356..70c436a5d 100644 --- a/src/input/Offset.hxx +++ b/src/input/Offset.hxx @@ -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. diff --git a/src/input/ThreadInputStream.hxx b/src/input/ThreadInputStream.hxx index b7f520a66..a05b782f8 100644 --- a/src/input/ThreadInputStream.hxx +++ b/src/input/ThreadInputStream.hxx @@ -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 diff --git a/src/input/plugins/CdioParanoiaInputPlugin.cxx b/src/input/plugins/CdioParanoiaInputPlugin.cxx index 2b6ef9aac..dc33c362e 100644 --- a/src/input/plugins/CdioParanoiaInputPlugin.cxx +++ b/src/input/plugins/CdioParanoiaInputPlugin.cxx @@ -35,9 +35,9 @@ #include "config/Block.hxx" #include <cassert> +#include <cstdint> #include <stdio.h> -#include <stdint.h> #include <string.h> #include <stdlib.h> diff --git a/src/lib/alsa/PeriodBuffer.hxx b/src/lib/alsa/PeriodBuffer.hxx index 816af621f..3141b86db 100644 --- a/src/lib/alsa/PeriodBuffer.hxx +++ b/src/lib/alsa/PeriodBuffer.hxx @@ -24,8 +24,7 @@ #include <algorithm> #include <cassert> - -#include <stdint.h> +#include <cstdint> namespace Alsa { diff --git a/src/lib/alsa/Version.hxx b/src/lib/alsa/Version.hxx index 3eef927d4..7b7dbc182 100644 --- a/src/lib/alsa/Version.hxx +++ b/src/lib/alsa/Version.hxx @@ -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, diff --git a/src/lib/chromaprint/DecoderClient.hxx b/src/lib/chromaprint/DecoderClient.hxx index 041ba194a..8accd6f74 100644 --- a/src/lib/chromaprint/DecoderClient.hxx +++ b/src/lib/chromaprint/DecoderClient.hxx @@ -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 { diff --git a/src/lib/crypto/MD5.hxx b/src/lib/crypto/MD5.hxx index d8018b6dc..f85cca911 100644 --- a/src/lib/crypto/MD5.hxx +++ b/src/lib/crypto/MD5.hxx @@ -34,8 +34,7 @@ #include "util/Compiler.h" #include <array> - -#include <stdint.h> +#include <cstdint> template<typename T> struct ConstBuffer; diff --git a/src/lib/ffmpeg/Time.hxx b/src/lib/ffmpeg/Time.hxx index bd189e255..86bea09a2 100644 --- a/src/lib/ffmpeg/Time.hxx +++ b/src/lib/ffmpeg/Time.hxx @@ -29,8 +29,7 @@ extern "C" { } #include <cassert> - -#include <stdint.h> +#include <cstdint> /* suppress the ffmpeg compatibility macro */ #ifdef SampleFormat diff --git a/src/lib/gcrypt/MD5.hxx b/src/lib/gcrypt/MD5.hxx index 2944acb70..7e2d81176 100644 --- a/src/lib/gcrypt/MD5.hxx +++ b/src/lib/gcrypt/MD5.hxx @@ -34,8 +34,7 @@ #include "util/Compiler.h" #include <array> - -#include <stdint.h> +#include <cstdint> template<typename T> struct ConstBuffer; diff --git a/src/lib/nfs/FileReader.hxx b/src/lib/nfs/FileReader.hxx index ed537f442..cdf693236 100644 --- a/src/lib/nfs/FileReader.hxx +++ b/src/lib/nfs/FileReader.hxx @@ -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; diff --git a/src/lib/xiph/OggPage.hxx b/src/lib/xiph/OggPage.hxx index 8a63cad61..3ca826848 100644 --- a/src/lib/xiph/OggPage.hxx +++ b/src/lib/xiph/OggPage.hxx @@ -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 diff --git a/src/lib/xiph/OggStreamState.hxx b/src/lib/xiph/OggStreamState.hxx index 8e8934915..4b988aca5 100644 --- a/src/lib/xiph/OggStreamState.hxx +++ b/src/lib/xiph/OggStreamState.hxx @@ -23,9 +23,9 @@ #include <ogg/ogg.h> #include <cassert> +#include <cstdint> #include <string.h> -#include <stdint.h> class OggStreamState { ogg_stream_state state; diff --git a/src/lib/xiph/OggSyncState.hxx b/src/lib/xiph/OggSyncState.hxx index af822c3c4..2cb338af4 100644 --- a/src/lib/xiph/OggSyncState.hxx +++ b/src/lib/xiph/OggSyncState.hxx @@ -23,8 +23,7 @@ #include <ogg/ogg.h> #include <cstddef> - -#include <stdint.h> +#include <cstdint> class Reader; diff --git a/src/net/IPv4Address.hxx b/src/net/IPv4Address.hxx index e040c7c5b..6137c120e 100644 --- a/src/net/IPv4Address.hxx +++ b/src/net/IPv4Address.hxx @@ -33,7 +33,7 @@ #include "SocketAddress.hxx" #include "util/ByteOrder.hxx" -#include <stdint.h> +#include <cstdint> #ifdef _WIN32 #include <winsock2.h> diff --git a/src/net/IPv6Address.hxx b/src/net/IPv6Address.hxx index 7bc0f66f6..4f75c81fc 100644 --- a/src/net/IPv6Address.hxx +++ b/src/net/IPv6Address.hxx @@ -34,7 +34,7 @@ #include "util/ByteOrder.hxx" #include "util/Compiler.h" -#include <stdint.h> +#include <cstdint> #ifdef _WIN32 #include <winsock2.h> diff --git a/src/output/Control.hxx b/src/output/Control.hxx index 5a254a7ae..c87dc133b 100644 --- a/src/output/Control.hxx +++ b/src/output/Control.hxx @@ -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; diff --git a/src/output/Source.hxx b/src/output/Source.hxx index 543935ce1..435afb525 100644 --- a/src/output/Source.hxx +++ b/src/output/Source.hxx @@ -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; diff --git a/src/output/plugins/httpd/Page.hxx b/src/output/plugins/httpd/Page.hxx index c575d04d9..0fc6566a7 100644 --- a/src/output/plugins/httpd/Page.hxx +++ b/src/output/plugins/httpd/Page.hxx @@ -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 diff --git a/src/pcm/Buffer.hxx b/src/pcm/Buffer.hxx index 6747e74fc..e6f16cf3c 100644 --- a/src/pcm/Buffer.hxx +++ b/src/pcm/Buffer.hxx @@ -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 diff --git a/src/pcm/Clamp.hxx b/src/pcm/Clamp.hxx index adcce3e47..dd822cc5a 100644 --- a/src/pcm/Clamp.hxx +++ b/src/pcm/Clamp.hxx @@ -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; diff --git a/src/pcm/Dither.hxx b/src/pcm/Dither.hxx index 0d5ff6801..e02ef8fd1 100644 --- a/src/pcm/Dither.hxx +++ b/src/pcm/Dither.hxx @@ -20,7 +20,7 @@ #ifndef MPD_PCM_DITHER_HXX #define MPD_PCM_DITHER_HXX -#include <stdint.h> +#include <cstdint> enum class SampleFormat : uint8_t; diff --git a/src/pcm/Dop.hxx b/src/pcm/Dop.hxx index 57a87f803..3a776d336 100644 --- a/src/pcm/Dop.hxx +++ b/src/pcm/Dop.hxx @@ -23,7 +23,7 @@ #include "Buffer.hxx" #include "RestBuffer.hxx" -#include <stdint.h> +#include <cstdint> template<typename T> struct ConstBuffer; diff --git a/src/pcm/Dsd16.hxx b/src/pcm/Dsd16.hxx index 67c30c90e..45a91e063 100644 --- a/src/pcm/Dsd16.hxx +++ b/src/pcm/Dsd16.hxx @@ -23,7 +23,7 @@ #include "Buffer.hxx" #include "RestBuffer.hxx" -#include <stdint.h> +#include <cstdint> template<typename T> struct ConstBuffer; diff --git a/src/pcm/Dsd2Pcm.hxx b/src/pcm/Dsd2Pcm.hxx index 42a422d9b..23f79a01b 100644 --- a/src/pcm/Dsd2Pcm.hxx +++ b/src/pcm/Dsd2Pcm.hxx @@ -35,8 +35,7 @@ or implied, of Sebastian Gesemann. #include <array> #include <cstddef> - -#include <stdint.h> +#include <cstdint> /** * A "dsd2pcm engine" for one channel. diff --git a/src/pcm/Dsd32.hxx b/src/pcm/Dsd32.hxx index 5cce58f88..13971ddd0 100644 --- a/src/pcm/Dsd32.hxx +++ b/src/pcm/Dsd32.hxx @@ -23,7 +23,7 @@ #include "Buffer.hxx" #include "RestBuffer.hxx" -#include <stdint.h> +#include <cstdint> template<typename T> struct ConstBuffer; diff --git a/src/pcm/Export.hxx b/src/pcm/Export.hxx index a39f8451f..696a8d29a 100644 --- a/src/pcm/Export.hxx +++ b/src/pcm/Export.hxx @@ -30,7 +30,7 @@ #include "Dop.hxx" #endif -#include <stdint.h> +#include <cstdint> template<typename T> struct ConstBuffer; diff --git a/src/pcm/Interleave.hxx b/src/pcm/Interleave.hxx index 4fd8de365..22d665280 100644 --- a/src/pcm/Interleave.hxx +++ b/src/pcm/Interleave.hxx @@ -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. diff --git a/src/pcm/Pack.hxx b/src/pcm/Pack.hxx index 7a2ef70c3..dd0c1dbe7 100644 --- a/src/pcm/Pack.hxx +++ b/src/pcm/Pack.hxx @@ -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 diff --git a/src/pcm/PcmChannels.hxx b/src/pcm/PcmChannels.hxx index 0088e1196..8b367bb10 100644 --- a/src/pcm/PcmChannels.hxx +++ b/src/pcm/PcmChannels.hxx @@ -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; diff --git a/src/pcm/PcmDsd.hxx b/src/pcm/PcmDsd.hxx index a0823e85a..b68c0e4e6 100644 --- a/src/pcm/PcmDsd.hxx +++ b/src/pcm/PcmDsd.hxx @@ -23,7 +23,7 @@ #include "Buffer.hxx" #include "Dsd2Pcm.hxx" -#include <stdint.h> +#include <cstdint> template<typename T> struct ConstBuffer; diff --git a/src/pcm/PcmFormat.hxx b/src/pcm/PcmFormat.hxx index fb12babb6..df4c47e32 100644 --- a/src/pcm/PcmFormat.hxx +++ b/src/pcm/PcmFormat.hxx @@ -22,7 +22,7 @@ #include "SampleFormat.hxx" -#include <stdint.h> +#include <cstdint> template<typename T> struct ConstBuffer; class PcmBuffer; diff --git a/src/pcm/SampleFormat.hxx b/src/pcm/SampleFormat.hxx index 9c7f92e57..08f9fd66d 100644 --- a/src/pcm/SampleFormat.hxx +++ b/src/pcm/SampleFormat.hxx @@ -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 */ diff --git a/src/pcm/Silence.hxx b/src/pcm/Silence.hxx index 7ae300c84..bfca0069c 100644 --- a/src/pcm/Silence.hxx +++ b/src/pcm/Silence.hxx @@ -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; diff --git a/src/pcm/Traits.hxx b/src/pcm/Traits.hxx index f36156714..ba41e1cfc 100644 --- a/src/pcm/Traits.hxx +++ b/src/pcm/Traits.hxx @@ -23,8 +23,7 @@ #include "SampleFormat.hxx" #include <cstddef> - -#include <stdint.h> +#include <cstdint> /** * This template describes the specified #SampleFormat. This is an diff --git a/src/pcm/Volume.cxx b/src/pcm/Volume.cxx index 975a4571c..d812dc332 100644 --- a/src/pcm/Volume.cxx +++ b/src/pcm/Volume.cxx @@ -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) diff --git a/src/player/Control.hxx b/src/player/Control.hxx index 711a26174..f5cc7ea3d 100644 --- a/src/player/Control.hxx +++ b/src/player/Control.hxx @@ -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; diff --git a/src/protocol/ArgParser.hxx b/src/protocol/ArgParser.hxx index 82a51e495..41abec040 100644 --- a/src/protocol/ArgParser.hxx +++ b/src/protocol/ArgParser.hxx @@ -20,7 +20,7 @@ #ifndef MPD_PROTOCOL_ARGPARSER_HXX #define MPD_PROTOCOL_ARGPARSER_HXX -#include <stdint.h> +#include <cstdint> struct RangeArg; class SongTime; diff --git a/src/queue/Queue.hxx b/src/queue/Queue.hxx index bee779491..62372fd01 100644 --- a/src/queue/Queue.hxx +++ b/src/queue/Queue.hxx @@ -26,10 +26,9 @@ #include "util/LazyRandomEngine.hxx" #include <cassert> +#include <cstdint> #include <utility> -#include <stdint.h> - class DetachedSong; /** diff --git a/src/queue/QueuePrint.hxx b/src/queue/QueuePrint.hxx index cd13db4d3..8fd94c347 100644 --- a/src/queue/QueuePrint.hxx +++ b/src/queue/QueuePrint.hxx @@ -25,7 +25,7 @@ #ifndef MPD_QUEUE_PRINT_HXX #define MPD_QUEUE_PRINT_HXX -#include <stdint.h> +#include <cstdint> struct Queue; class SongFilter; diff --git a/src/song/Filter.hxx b/src/song/Filter.hxx index 7f64419d0..3754e3ad6 100644 --- a/src/song/Filter.hxx +++ b/src/song/Filter.hxx @@ -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. */ diff --git a/src/song/TagSongFilter.hxx b/src/song/TagSongFilter.hxx index 92691e662..2f45d0e59 100644 --- a/src/song/TagSongFilter.hxx +++ b/src/song/TagSongFilter.hxx @@ -23,7 +23,7 @@ #include "ISongFilter.hxx" #include "StringFilter.hxx" -#include <stdint.h> +#include <cstdint> enum TagType : uint8_t; struct Tag; diff --git a/src/storage/FileInfo.hxx b/src/storage/FileInfo.hxx index 3ca9d8324..8b7e7d425 100644 --- a/src/storage/FileInfo.hxx +++ b/src/storage/FileInfo.hxx @@ -22,7 +22,7 @@ #include <chrono> -#include <stdint.h> +#include <cstdint> struct StorageFileInfo { enum class Type : uint8_t { diff --git a/src/system/EpollFD.hxx b/src/system/EpollFD.hxx index c869bfdc0..4161b54f5 100644 --- a/src/system/EpollFD.hxx +++ b/src/system/EpollFD.hxx @@ -32,8 +32,9 @@ #include "UniqueFileDescriptor.hxx" +#include <cstdint> + #include <sys/epoll.h> -#include <stdint.h> /** * A class that wraps Linux epoll. diff --git a/src/system/FileDescriptor.cxx b/src/system/FileDescriptor.cxx index cd13e0b91..27e66e95d 100644 --- a/src/system/FileDescriptor.cxx +++ b/src/system/FileDescriptor.cxx @@ -31,8 +31,8 @@ #include "system/Error.hxx" #include <cassert> +#include <cstdint> -#include <stdint.h> #include <sys/stat.h> #include <fcntl.h> diff --git a/src/tag/Aiff.cxx b/src/tag/Aiff.cxx index 99c1c2e20..37eeadf66 100644 --- a/src/tag/Aiff.cxx +++ b/src/tag/Aiff.cxx @@ -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 { diff --git a/src/tag/ApeLoader.cxx b/src/tag/ApeLoader.cxx index e07d7b457..67daa1e96 100644 --- a/src/tag/ApeLoader.cxx +++ b/src/tag/ApeLoader.cxx @@ -23,9 +23,9 @@ #include "util/StringView.hxx" #include <cassert> +#include <cstdint> #include <memory> -#include <stdint.h> #include <string.h> struct ApeFooter { diff --git a/src/tag/Id3Picture.cxx b/src/tag/Id3Picture.cxx index 959e60cff..a5a351e0c 100644 --- a/src/tag/Id3Picture.cxx +++ b/src/tag/Id3Picture.cxx @@ -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 { diff --git a/src/tag/Mask.hxx b/src/tag/Mask.hxx index 7e43e8cf3..d53e93ef9 100644 --- a/src/tag/Mask.hxx +++ b/src/tag/Mask.hxx @@ -22,7 +22,7 @@ #include "Type.h" -#include <stdint.h> +#include <cstdint> class TagMask { typedef uint_least32_t mask_t; diff --git a/src/tag/Pool.cxx b/src/tag/Pool.cxx index 192e291d3..f0f5c5e8d 100644 --- a/src/tag/Pool.cxx +++ b/src/tag/Pool.cxx @@ -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; diff --git a/src/tag/Riff.cxx b/src/tag/Riff.cxx index ad1f04992..6688dab5d 100644 --- a/src/tag/Riff.cxx +++ b/src/tag/Riff.cxx @@ -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 { diff --git a/src/tag/Rva2.cxx b/src/tag/Rva2.cxx index 800d8720c..7216fa38a 100644 --- a/src/tag/Rva2.cxx +++ b/src/tag/Rva2.cxx @@ -22,7 +22,8 @@ #include <id3tag.h> -#include <stdint.h> +#include <cstdint> + #include <string.h> enum class Rva2Channel : uint8_t { diff --git a/src/tag/Type.h b/src/tag/Type.h index b31b37654..74e307b2b 100644 --- a/src/tag/Type.h +++ b/src/tag/Type.h @@ -21,7 +21,7 @@ #define MPD_TAG_TYPE_H #ifdef __cplusplus -#include <stdint.h> +#include <cstdint> #endif /** diff --git a/src/time/FileTime.hxx b/src/time/FileTime.hxx index 542f84c85..4f20216eb 100644 --- a/src/time/FileTime.hxx +++ b/src/time/FileTime.hxx @@ -33,8 +33,7 @@ #include <fileapi.h> #include <chrono> - -#include <stdint.h> +#include <cstdint> constexpr uint64_t ConstructUint64(DWORD lo, DWORD hi) noexcept diff --git a/src/util/BitReverse.hxx b/src/util/BitReverse.hxx index f8e9cf63b..5dd8c448e 100644 --- a/src/util/BitReverse.hxx +++ b/src/util/BitReverse.hxx @@ -22,7 +22,7 @@ #include "Compiler.h" -#include <stdint.h> +#include <cstdint> /** * @see http://graphics.stanford.edu/~seander/bithacks.html#ReverseByteWith64BitsDiv diff --git a/src/util/ByteOrder.hxx b/src/util/ByteOrder.hxx index 719d3a083..d4a61b729 100644 --- a/src/util/ByteOrder.hxx +++ b/src/util/ByteOrder.hxx @@ -32,7 +32,7 @@ #include "Compiler.h" -#include <stdint.h> +#include <cstdint> #if defined(__i386__) || defined(__x86_64__) || defined(__ARMEL__) /* well-known little-endian */ diff --git a/src/util/ByteReverse.hxx b/src/util/ByteReverse.hxx index 842338ffb..f4de141a9 100644 --- a/src/util/ByteReverse.hxx +++ b/src/util/ByteReverse.hxx @@ -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 diff --git a/src/util/HexFormat.hxx b/src/util/HexFormat.hxx index 0f62ad0df..0940862da 100644 --- a/src/util/HexFormat.hxx +++ b/src/util/HexFormat.hxx @@ -35,8 +35,7 @@ #include "Compiler.h" #include <cstddef> - -#include <stdint.h> +#include <cstdint> /** * Format the given byte sequence into a null-terminated hexadecimal diff --git a/src/util/HugeAllocator.hxx b/src/util/HugeAllocator.hxx index e36ba3895..bb6a12726 100644 --- a/src/util/HugeAllocator.hxx +++ b/src/util/HugeAllocator.hxx @@ -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) diff --git a/src/util/NumberParser.hxx b/src/util/NumberParser.hxx index c84c96ef5..d0ecbd061 100644 --- a/src/util/NumberParser.hxx +++ b/src/util/NumberParser.hxx @@ -32,8 +32,8 @@ #define NUMBER_PARSER_HXX #include <cassert> +#include <cstdint> -#include <stdint.h> #include <stdlib.h> struct StringView; diff --git a/src/util/PeakBuffer.hxx b/src/util/PeakBuffer.hxx index 300f7573a..9e30ba211 100644 --- a/src/util/PeakBuffer.hxx +++ b/src/util/PeakBuffer.hxx @@ -23,8 +23,7 @@ #include "Compiler.h" #include <cstddef> - -#include <stdint.h> +#include <cstdint> template<typename T> struct WritableBuffer; template<typename T> class DynamicFifoBuffer; diff --git a/src/util/UTF8.cxx b/src/util/UTF8.cxx index ba5f0d8f1..9dbcb3260 100644 --- a/src/util/UTF8.cxx +++ b/src/util/UTF8.cxx @@ -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? |