From 2a1fb277358660729787b55093099a431c4273d1 Mon Sep 17 00:00:00 2001 From: Urs Fleisch Date: Sun, 16 Jul 2023 07:24:01 +0200 Subject: [PATCH] clang-tidy: Replace C headers with C++ alternatives run-clang-tidy -header-filter='.*' -checks='-*,modernize-deprecated-headers' Fixed manually as automatic fix would shuffle headers around. --- ConfigureChecks.cmake | 2 +- bindings/c/tag_c.cpp | 4 ++-- examples/framelist.cpp | 2 +- examples/tagreader.cpp | 2 +- examples/tagwriter.cpp | 6 +++--- taglib/mpc/mpcproperties.cpp | 2 +- taglib/mpeg/id3v2/frames/chapterframe.cpp | 2 +- taglib/toolkit/tbytevectorstream.cpp | 6 +++--- taglib/toolkit/tfile.cpp | 2 +- taglib/toolkit/tfilestream.cpp | 2 +- taglib/wavpack/wavpackproperties.cpp | 2 +- taglib/xm/xmfile.cpp | 2 +- tests/main.cpp | 4 ++-- tests/test_aiff.cpp | 2 +- tests/test_ape.cpp | 2 +- tests/test_apetag.cpp | 2 +- tests/test_asf.cpp | 2 +- tests/test_fileref.cpp | 2 +- tests/test_flac.cpp | 2 +- tests/test_flacpicture.cpp | 2 +- tests/test_flacunknownmetadatablock.cpp | 2 +- tests/test_id3v1.cpp | 2 +- tests/test_id3v2.cpp | 2 +- tests/test_info.cpp | 3 +-- tests/test_mp4.cpp | 2 +- tests/test_mp4coverart.cpp | 2 +- tests/test_mp4item.cpp | 2 +- tests/test_mpc.cpp | 2 +- tests/test_mpeg.cpp | 2 +- tests/test_ogg.cpp | 2 +- tests/test_oggflac.cpp | 2 +- tests/test_opus.cpp | 2 +- tests/test_riff.cpp | 2 +- tests/test_string.cpp | 3 +-- tests/test_trueaudio.cpp | 2 +- tests/test_wav.cpp | 2 +- tests/test_wavpack.cpp | 2 +- tests/test_xiphcomment.cpp | 2 +- tests/utils.h | 6 +++--- 39 files changed, 47 insertions(+), 49 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 7d2ff953..29e015d8 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -105,7 +105,7 @@ if(NOT HAVE_GCC_BYTESWAP) if(NOT HAVE_GLIBC_BYTESWAP) check_cxx_source_compiles(" - #include + #include int main() { _byteswap_ushort(0); _byteswap_ulong(0); diff --git a/bindings/c/tag_c.cpp b/bindings/c/tag_c.cpp index b779bb81..f3f03e61 100644 --- a/bindings/c/tag_c.cpp +++ b/bindings/c/tag_c.cpp @@ -23,7 +23,7 @@ # include #endif -#include +#include #include #include #include @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include diff --git a/examples/framelist.cpp b/examples/framelist.cpp index a770728c..9c837800 100644 --- a/examples/framelist.cpp +++ b/examples/framelist.cpp @@ -23,7 +23,7 @@ */ #include -#include +#include #include diff --git a/examples/tagreader.cpp b/examples/tagreader.cpp index 0d6b5191..e7289497 100644 --- a/examples/tagreader.cpp +++ b/examples/tagreader.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include diff --git a/examples/tagwriter.cpp b/examples/tagwriter.cpp index 0f094cd0..32303f06 100644 --- a/examples/tagwriter.cpp +++ b/examples/tagwriter.cpp @@ -24,12 +24,12 @@ #include #include -#include +#include -#include +#include #include #include -#include +#include #include #include diff --git a/taglib/mpc/mpcproperties.cpp b/taglib/mpc/mpcproperties.cpp index 6ddf9a35..b24c4099 100644 --- a/taglib/mpc/mpcproperties.cpp +++ b/taglib/mpc/mpcproperties.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "mpcproperties.h" #include "mpcfile.h" diff --git a/taglib/mpeg/id3v2/frames/chapterframe.cpp b/taglib/mpeg/id3v2/frames/chapterframe.cpp index 171b1ee3..55719676 100644 --- a/taglib/mpeg/id3v2/frames/chapterframe.cpp +++ b/taglib/mpeg/id3v2/frames/chapterframe.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "chapterframe.h" diff --git a/taglib/toolkit/tbytevectorstream.cpp b/taglib/toolkit/tbytevectorstream.cpp index 895c9e7d..8fb8a8b9 100644 --- a/taglib/toolkit/tbytevectorstream.cpp +++ b/taglib/toolkit/tbytevectorstream.cpp @@ -27,10 +27,10 @@ #include "tstring.h" #include "tdebug.h" -#include -#include +#include +#include -#include +#include using namespace TagLib; diff --git a/taglib/toolkit/tfile.cpp b/taglib/toolkit/tfile.cpp index af98b495..6c3e088d 100644 --- a/taglib/toolkit/tfile.cpp +++ b/taglib/toolkit/tfile.cpp @@ -33,7 +33,7 @@ # include # include #else -# include +# include # include #endif diff --git a/taglib/toolkit/tfilestream.cpp b/taglib/toolkit/tfilestream.cpp index 2df4869c..38190186 100644 --- a/taglib/toolkit/tfilestream.cpp +++ b/taglib/toolkit/tfilestream.cpp @@ -30,7 +30,7 @@ #ifdef _WIN32 # include #else -# include +# include # include #endif diff --git a/taglib/wavpack/wavpackproperties.cpp b/taglib/wavpack/wavpackproperties.cpp index a59224b1..bb245799 100644 --- a/taglib/wavpack/wavpackproperties.cpp +++ b/taglib/wavpack/wavpackproperties.cpp @@ -27,7 +27,7 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include +#include #include #include diff --git a/taglib/xm/xmfile.cpp b/taglib/xm/xmfile.cpp index b8ca6037..a570bf1d 100644 --- a/taglib/xm/xmfile.cpp +++ b/taglib/xm/xmfile.cpp @@ -29,7 +29,7 @@ #include "modfileprivate.h" #include "tpropertymap.h" -#include +#include #include using namespace TagLib; diff --git a/tests/main.cpp b/tests/main.cpp index 86a4208c..d995308a 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -23,8 +23,8 @@ * http://www.mozilla.org/MPL/ * ***************************************************************************/ -#include -#include +#include +#include #include #include #include diff --git a/tests/test_aiff.cpp b/tests/test_aiff.cpp index 03cc545e..01887602 100644 --- a/tests/test_aiff.cpp +++ b/tests/test_aiff.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_ape.cpp b/tests/test_ape.cpp index 81b8510f..f2ecbf66 100644 --- a/tests/test_ape.cpp +++ b/tests/test_ape.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_apetag.cpp b/tests/test_apetag.cpp index 05a8abac..13936e7c 100644 --- a/tests/test_apetag.cpp +++ b/tests/test_apetag.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_asf.cpp b/tests/test_asf.cpp index ca13e16d..335caeff 100644 --- a/tests/test_asf.cpp +++ b/tests/test_asf.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_fileref.cpp b/tests/test_fileref.cpp index dc946fe3..77fb4ea2 100644 --- a/tests/test_fileref.cpp +++ b/tests/test_fileref.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_flac.cpp b/tests/test_flac.cpp index 924fb451..e508025a 100644 --- a/tests/test_flac.cpp +++ b/tests/test_flac.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_flacpicture.cpp b/tests/test_flacpicture.cpp index ffef79fe..a71f7d59 100644 --- a/tests/test_flacpicture.cpp +++ b/tests/test_flacpicture.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_flacunknownmetadatablock.cpp b/tests/test_flacunknownmetadatablock.cpp index d08a9bae..114c244c 100644 --- a/tests/test_flacunknownmetadatablock.cpp +++ b/tests/test_flacunknownmetadatablock.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_id3v1.cpp b/tests/test_id3v1.cpp index d3f037aa..2b93b6b8 100644 --- a/tests/test_id3v1.cpp +++ b/tests/test_id3v1.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_id3v2.cpp b/tests/test_id3v2.cpp index 4958ea1b..93b454e6 100644 --- a/tests/test_id3v2.cpp +++ b/tests/test_id3v2.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_info.cpp b/tests/test_info.cpp index 4302a249..449d04af 100644 --- a/tests/test_info.cpp +++ b/tests/test_info.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include "utils.h" @@ -72,4 +72,3 @@ public: }; CPPUNIT_TEST_SUITE_REGISTRATION(TestInfoTag); - diff --git a/tests/test_mp4.cpp b/tests/test_mp4.cpp index 5c6a9cbb..34a4da49 100644 --- a/tests/test_mp4.cpp +++ b/tests/test_mp4.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_mp4coverart.cpp b/tests/test_mp4coverart.cpp index 49ef0470..ea0ed36d 100644 --- a/tests/test_mp4coverart.cpp +++ b/tests/test_mp4coverart.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_mp4item.cpp b/tests/test_mp4item.cpp index a9a5c99a..52bdfec4 100644 --- a/tests/test_mp4item.cpp +++ b/tests/test_mp4item.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_mpc.cpp b/tests/test_mpc.cpp index 25f75944..24277c6d 100644 --- a/tests/test_mpc.cpp +++ b/tests/test_mpc.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_mpeg.cpp b/tests/test_mpeg.cpp index c5cd23e4..0a27f2ac 100644 --- a/tests/test_mpeg.cpp +++ b/tests/test_mpeg.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_ogg.cpp b/tests/test_ogg.cpp index 3c5e4ac6..62a64ea2 100644 --- a/tests/test_ogg.cpp +++ b/tests/test_ogg.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_oggflac.cpp b/tests/test_oggflac.cpp index b8fde4a9..46faf9f7 100644 --- a/tests/test_oggflac.cpp +++ b/tests/test_oggflac.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_opus.cpp b/tests/test_opus.cpp index d172e479..b6235c0f 100644 --- a/tests/test_opus.cpp +++ b/tests/test_opus.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_riff.cpp b/tests/test_riff.cpp index 3da1d410..7e6a2bb5 100644 --- a/tests/test_riff.cpp +++ b/tests/test_riff.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_string.cpp b/tests/test_string.cpp index 7b60b814..376e4ae4 100644 --- a/tests/test_string.cpp +++ b/tests/test_string.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include using namespace std; @@ -368,4 +368,3 @@ public: }; CPPUNIT_TEST_SUITE_REGISTRATION(TestString); - diff --git a/tests/test_trueaudio.cpp b/tests/test_trueaudio.cpp index d8e6fbca..381b4423 100644 --- a/tests/test_trueaudio.cpp +++ b/tests/test_trueaudio.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_wav.cpp b/tests/test_wav.cpp index 55d71e0b..67d56ead 100644 --- a/tests/test_wav.cpp +++ b/tests/test_wav.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_wavpack.cpp b/tests/test_wavpack.cpp index 591529fb..b8fa16eb 100644 --- a/tests/test_wavpack.cpp +++ b/tests/test_wavpack.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/test_xiphcomment.cpp b/tests/test_xiphcomment.cpp index 311a8862..e4a6091f 100644 --- a/tests/test_xiphcomment.cpp +++ b/tests/test_xiphcomment.cpp @@ -24,7 +24,7 @@ ***************************************************************************/ #include -#include +#include #include #include #include diff --git a/tests/utils.h b/tests/utils.h index 51d8862b..ac45a1f6 100644 --- a/tests/utils.h +++ b/tests/utils.h @@ -35,9 +35,9 @@ #include #include #endif -#include -#include -#include +#include +#include +#include #include #include