From 7e5ba7cb236ea446af496511d2ae5df622ef58c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20D=C3=ADaz=20M=C3=A1s?= Date: Fri, 18 Feb 2022 19:01:24 +0100 Subject: [PATCH] Remove many redundant or not needed header inclusions --- .gitignore | 2 ++ include/exiv2/ini.hpp | 1 - include/exiv2/rafimage.hpp | 5 ----- include/exiv2/tags.hpp | 5 ----- include/exiv2/types.hpp | 8 -------- src/canonmn_int.hpp | 5 ----- src/casiomn_int.hpp | 4 ---- src/crwimage_int.hpp | 2 -- src/fujimn_int.hpp | 1 - src/makernote_int.cpp | 1 + src/makernote_int.hpp | 4 ---- src/panasonicmn_int.hpp | 4 ---- src/pentaxmn_int.hpp | 4 ---- src/pngchunk_int.hpp | 5 ----- src/rw2image_int.hpp | 4 ---- src/samsungmn_int.hpp | 5 ----- src/sigmamn_int.hpp | 5 ----- src/sonymn_int.hpp | 6 ------ src/tags_int.hpp | 7 ------- src/tiffcomposite_int.hpp | 9 --------- src/tifffwd_int.hpp | 2 -- src/tiffimage_int.hpp | 6 ------ src/tiffvisitor_int.hpp | 10 ++-------- 23 files changed, 5 insertions(+), 100 deletions(-) diff --git a/.gitignore b/.gitignore index 702c4fae..c46bd2e7 100644 --- a/.gitignore +++ b/.gitignore @@ -25,3 +25,5 @@ doc/html contrib/vms/.vagrant /.vscode .vs/ + +*cppcheck* diff --git a/include/exiv2/ini.hpp b/include/exiv2/ini.hpp index c1749a3b..bd717177 100755 --- a/include/exiv2/ini.hpp +++ b/include/exiv2/ini.hpp @@ -32,7 +32,6 @@ #include #include -#include namespace Exiv2 { diff --git a/include/exiv2/rafimage.hpp b/include/exiv2/rafimage.hpp index 6cb0bea0..50a08e10 100644 --- a/include/exiv2/rafimage.hpp +++ b/include/exiv2/rafimage.hpp @@ -25,11 +25,6 @@ // included header files #include "image.hpp" -#include "basicio.hpp" -#include "types.hpp" - -// + standard includes -#include // ***************************************************************************** // namespace extensions diff --git a/include/exiv2/tags.hpp b/include/exiv2/tags.hpp index 8910839e..3670da17 100644 --- a/include/exiv2/tags.hpp +++ b/include/exiv2/tags.hpp @@ -26,11 +26,6 @@ // included header files #include "metadatum.hpp" -// + standard includes -#include -#include -#include - // ***************************************************************************** // namespace extensions namespace Exiv2 { diff --git a/include/exiv2/types.hpp b/include/exiv2/types.hpp index 6d40d2fb..8ed5ab56 100644 --- a/include/exiv2/types.hpp +++ b/include/exiv2/types.hpp @@ -576,11 +576,6 @@ namespace Exiv2 { // This is abs() - given the existence of broken compilers with Koenig // lookup issues and other problems, I code this explicitly. (Remember, // IntType may be a user-defined type). -#ifdef _MSC_VER -#pragma warning( disable : 4146 ) -#undef max -#undef min -#endif if (n < zero) { if (n == std::numeric_limits::min()) { n = std::numeric_limits::max(); @@ -590,9 +585,6 @@ namespace Exiv2 { } if (m < zero) m = -m; -#ifdef _MSC_VER -#pragma warning( default : 4146 ) -#endif // As n and m are now positive, we can be sure that %= returns a // positive value (the standard guarantees this for built-in types, diff --git a/src/canonmn_int.hpp b/src/canonmn_int.hpp index 8d2dee22..93a0a23a 100644 --- a/src/canonmn_int.hpp +++ b/src/canonmn_int.hpp @@ -37,11 +37,6 @@ #include "tags.hpp" #include "types.hpp" -// + standard includes -#include -#include -#include - // ***************************************************************************** // namespace extensions namespace Exiv2 { diff --git a/src/casiomn_int.hpp b/src/casiomn_int.hpp index 33f39b9a..4a7cc3c2 100644 --- a/src/casiomn_int.hpp +++ b/src/casiomn_int.hpp @@ -33,10 +33,6 @@ #include "tags.hpp" #include "types.hpp" -// + standard includes -#include -#include - // ***************************************************************************** // namespace extensions namespace Exiv2 { diff --git a/src/crwimage_int.hpp b/src/crwimage_int.hpp index 73cbc41f..935802f6 100644 --- a/src/crwimage_int.hpp +++ b/src/crwimage_int.hpp @@ -26,8 +26,6 @@ #include "image.hpp" // + standard includes -#include -#include #include #include diff --git a/src/fujimn_int.hpp b/src/fujimn_int.hpp index 9c802790..1f8e6ff8 100644 --- a/src/fujimn_int.hpp +++ b/src/fujimn_int.hpp @@ -24,7 +24,6 @@ // ***************************************************************************** // included header files #include "tags.hpp" -#include "types.hpp" // ***************************************************************************** // namespace extensions diff --git a/src/makernote_int.cpp b/src/makernote_int.cpp index 657c5641..479ca933 100644 --- a/src/makernote_int.cpp +++ b/src/makernote_int.cpp @@ -37,6 +37,7 @@ // + standard includes #include #include +#include namespace fs = std::filesystem; diff --git a/src/makernote_int.hpp b/src/makernote_int.hpp index df8a1ebd..aea41027 100644 --- a/src/makernote_int.hpp +++ b/src/makernote_int.hpp @@ -24,12 +24,8 @@ // included header files #include "tifffwd_int.hpp" #include "tags_int.hpp" -#include "ini.hpp" #include "types.hpp" -// + standard includes -#include - // ***************************************************************************** // namespace extensions namespace Exiv2 { diff --git a/src/panasonicmn_int.hpp b/src/panasonicmn_int.hpp index 4951a401..4acde797 100644 --- a/src/panasonicmn_int.hpp +++ b/src/panasonicmn_int.hpp @@ -25,10 +25,6 @@ #include "tags.hpp" #include "types.hpp" -// + standard includes -#include -#include - // ***************************************************************************** // namespace extensions namespace Exiv2 { diff --git a/src/pentaxmn_int.hpp b/src/pentaxmn_int.hpp index 597c9728..ec407027 100644 --- a/src/pentaxmn_int.hpp +++ b/src/pentaxmn_int.hpp @@ -26,10 +26,6 @@ #include "tags_int.hpp" #include "types.hpp" -// + standard includes -#include -#include - // ***************************************************************************** // namespace extensions namespace Exiv2 { diff --git a/src/pngchunk_int.hpp b/src/pngchunk_int.hpp index 018eae67..db5404ad 100644 --- a/src/pngchunk_int.hpp +++ b/src/pngchunk_int.hpp @@ -25,11 +25,6 @@ #include "types.hpp" #include "pngimage.hpp" -// + standard includes -#include -#include -#include - // ***************************************************************************** // namespace extensions namespace Exiv2 { diff --git a/src/rw2image_int.hpp b/src/rw2image_int.hpp index fe1838c0..c7443857 100644 --- a/src/rw2image_int.hpp +++ b/src/rw2image_int.hpp @@ -23,10 +23,6 @@ // ***************************************************************************** // included header files #include "tiffimage_int.hpp" -#include "types.hpp" - -// + standard includes -#include // ***************************************************************************** // namespace extensions diff --git a/src/samsungmn_int.hpp b/src/samsungmn_int.hpp index 8670821d..dcf4ec82 100644 --- a/src/samsungmn_int.hpp +++ b/src/samsungmn_int.hpp @@ -25,11 +25,6 @@ #include "tags.hpp" #include "types.hpp" -// + standard includes -#include -#include -#include - // ***************************************************************************** // namespace extensions namespace Exiv2 { diff --git a/src/sigmamn_int.hpp b/src/sigmamn_int.hpp index f0b18134..03467a94 100644 --- a/src/sigmamn_int.hpp +++ b/src/sigmamn_int.hpp @@ -25,11 +25,6 @@ #include "tags.hpp" #include "types.hpp" -// + standard includes -#include -#include -#include - // ***************************************************************************** // namespace extensions namespace Exiv2 { diff --git a/src/sonymn_int.hpp b/src/sonymn_int.hpp index 7f0d394f..a2de831d 100644 --- a/src/sonymn_int.hpp +++ b/src/sonymn_int.hpp @@ -22,14 +22,8 @@ // ***************************************************************************** // included header files -#include "tags.hpp" -#include "types.hpp" #include "tiffcomposite_int.hpp" -// + standard includes -#include -#include - // ***************************************************************************** // namespace extensions namespace Exiv2 { diff --git a/src/tags_int.hpp b/src/tags_int.hpp index 0f965d2c..8576de3f 100644 --- a/src/tags_int.hpp +++ b/src/tags_int.hpp @@ -22,14 +22,7 @@ // ***************************************************************************** // included header files -#include "types.hpp" #include "tags.hpp" -#include "value.hpp" - -// + standard includes -#include -#include -#include // ***************************************************************************** // namespace extensions diff --git a/src/tiffcomposite_int.hpp b/src/tiffcomposite_int.hpp index ee2cca75..2920db70 100644 --- a/src/tiffcomposite_int.hpp +++ b/src/tiffcomposite_int.hpp @@ -22,16 +22,7 @@ // ***************************************************************************** // included header files -#include "value.hpp" #include "tifffwd_int.hpp" -#include "types.hpp" - -// + standard includes -#include -#include -#include -#include -#include // ***************************************************************************** // namespace extensions diff --git a/src/tifffwd_int.hpp b/src/tifffwd_int.hpp index f62ced67..fd355e64 100644 --- a/src/tifffwd_int.hpp +++ b/src/tifffwd_int.hpp @@ -26,9 +26,7 @@ #include "tags_int.hpp" // + standard includes -#include #include -#include // ***************************************************************************** // Exiv2 namespace extensions diff --git a/src/tiffimage_int.hpp b/src/tiffimage_int.hpp index 38a192cd..94292977 100644 --- a/src/tiffimage_int.hpp +++ b/src/tiffimage_int.hpp @@ -25,12 +25,6 @@ #include "tifffwd_int.hpp" #include "tiffcomposite_int.hpp" #include "image.hpp" -#include "tags_int.hpp" -#include "types.hpp" - -// + standard includes -#include -#include // ***************************************************************************** // namespace extensions diff --git a/src/tiffvisitor_int.hpp b/src/tiffvisitor_int.hpp index 872a91e0..f1d3a877 100644 --- a/src/tiffvisitor_int.hpp +++ b/src/tiffvisitor_int.hpp @@ -26,15 +26,7 @@ #include "tifffwd_int.hpp" #include "types.hpp" -// + standard includes #include -#include -#include -#include -#include -#include -#include -#include // ***************************************************************************** // namespace extensions @@ -42,6 +34,8 @@ namespace Exiv2 { class IptcData; class XmpData; + class TiffImageEntry; + class TiffDataEntryBase; namespace Internal {