Skip to content

Commit

Permalink
clang-tidy: remove unused headers
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Feb 4, 2025
1 parent d87d8d1 commit a86a481
Show file tree
Hide file tree
Showing 41 changed files with 35 additions and 54 deletions.
1 change: 0 additions & 1 deletion app/actions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "iptc.hpp"
#include "preview.hpp"
#include "safe_op.hpp"
#include "types.hpp"
#include "xmp_exiv2.hpp"

#include <filesystem>
Expand Down
8 changes: 3 additions & 5 deletions src/asfvideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@
// included header files
#include "asfvideo.hpp"

#include <cstring>
#include <iostream>
#include <sstream>

#include "basicio.hpp"
#include "config.h"
#include "enforce.hpp"
#include "error.hpp"
#include "futils.hpp"
#include "helper_functions.hpp"
#include "image_int.hpp"
#include "utils.hpp"

#include <cstring>

// *****************************************************************************
// class member definitions
namespace Exiv2 {
Expand Down
2 changes: 0 additions & 2 deletions src/bmffimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "image.hpp"
#include "image_int.hpp"
#include "safe_op.hpp"
#include "tiffimage.hpp"
#include "tiffimage_int.hpp"
#include "types.hpp"
#include "utils.hpp"
Expand All @@ -21,7 +20,6 @@
#endif

// + standard includes
#include <cinttypes>
#include <cstdio>
#include <cstring>
#include <iostream>
Expand Down
5 changes: 4 additions & 1 deletion src/bmpimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@

// + standard includes
#include <cstring>
#include <iostream>
#include <string>

#ifdef EXIV2_DEBUG_MESSAGES
#include <iostream>
#endif

// *****************************************************************************
// class member definitions
namespace Exiv2 {
Expand Down
2 changes: 2 additions & 0 deletions src/crwimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
#include "futils.hpp"
#include "tags.hpp"

#ifdef EXIV2_DEBUG_MESSAGES
#include <iostream>
#endif

// *****************************************************************************
// class member definitions
Expand Down
1 change: 0 additions & 1 deletion src/datasets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include "image_int.hpp"

#include <array>
#include <iomanip>
#include <sstream>

Expand Down
1 change: 0 additions & 1 deletion src/error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// included header files
#include "error.hpp"
#include "i18n.h" // NLS support.
#include "types.hpp"

// + standard includes
#include <array>
Expand Down
1 change: 0 additions & 1 deletion src/futils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#include "config.h"
#include "enforce.hpp"
#include "error.hpp"
#include "utils.hpp"

// + standard includes
Expand Down
2 changes: 2 additions & 0 deletions src/gifimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
#include "error.hpp"
#include "futils.hpp"

#ifdef EXIV2_DEBUG_MESSAGES
#include <iostream>
#endif

// *****************************************************************************
// class member definitions
Expand Down
1 change: 0 additions & 1 deletion src/http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <array>
#include <cerrno>
#include <chrono>
#include <cinttypes>
#include <thread>

////////////////////////////////////////
Expand Down
1 change: 0 additions & 1 deletion src/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#include <bit>
#include <cstdio>
#include <cstring>
#include <limits>
#include <set>

#ifdef _WIN32
Expand Down
5 changes: 4 additions & 1 deletion src/jp2image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@

#include <algorithm>
#include <array>
#include <fstream>
#include <iostream>

#ifdef EXIV2_DEBUG_MESSAGES
#include <fstream>
#endif

namespace Exiv2 {
namespace {
// JPEG-2000 box types
Expand Down
1 change: 0 additions & 1 deletion src/jp2image_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "jp2image_int.hpp"

#include "error.hpp"
#include "types.hpp"

#include <cassert>
Expand Down
4 changes: 0 additions & 4 deletions src/matroskavideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,11 @@
#include "futils.hpp"
#include "helper_functions.hpp"
#include "matroskavideo.hpp"
#include "tags.hpp"
#include "tags_int.hpp"

// + standard includes
#include <array>
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <limits>
// *****************************************************************************
// class member definitions
namespace Exiv2::Internal {
Expand Down
4 changes: 1 addition & 3 deletions src/minoltamn_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
#include "tags_int.hpp"
#include "value.hpp"

#include <array>
#include <sstream>

#include <cstdio> // popen to call exiftool
#include <sstream>

// *****************************************************************************
// class member definitions
Expand Down
2 changes: 2 additions & 0 deletions src/mrwimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
#include "image.hpp"
#include "tiffimage.hpp"

#ifdef EXIV2_DEBUG_MESSAGES
#include <iostream>
#endif

namespace Exiv2 {
MrwImage::MrwImage(BasicIo::UniquePtr io, bool /*create*/) :
Expand Down
1 change: 0 additions & 1 deletion src/orfimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "tiffimage.hpp"
#include "tiffimage_int.hpp"

#include <array>
#include <iostream>

// *****************************************************************************
Expand Down
2 changes: 0 additions & 2 deletions src/pentaxmn_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
#include "utils.hpp"
#include "value.hpp"

#include <array>

// *****************************************************************************
// class member definitions
namespace Exiv2::Internal {
Expand Down
2 changes: 2 additions & 0 deletions src/photoshop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#include "image.hpp"
#include "safe_op.hpp"

#ifdef EXIV2_DEBUG_MESSAGES
#include <iostream>
#endif

namespace Exiv2 {

Expand Down
1 change: 0 additions & 1 deletion src/pngchunk_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "helper_functions.hpp"
#include "image.hpp"
#include "iptc.hpp"
#include "jpgimage.hpp"
#include "photoshop.hpp"
#include "pngchunk_int.hpp"
#include "safe_op.hpp"
Expand Down
1 change: 0 additions & 1 deletion src/pngimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "futils.hpp"
#include "image.hpp"
#include "image_int.hpp"
#include "jpgimage.hpp"
#include "photoshop.hpp"
#include "pngchunk_int.hpp"
#include "pngimage.hpp"
Expand Down
1 change: 0 additions & 1 deletion src/preview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include "enforce.hpp"
#include "futils.hpp"
#include "image.hpp"
#include "jpgimage.hpp"
#include "photoshop.hpp"
#include "safe_op.hpp"
#include "tiffimage.hpp"
Expand Down
3 changes: 2 additions & 1 deletion src/psdimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@
#include "error.hpp"
#include "futils.hpp"
#include "image.hpp"
#include "jpgimage.hpp"
#include "photoshop.hpp"

#ifdef EXIV2_DEBUG_MESSAGES
#include <iostream>
#endif

// Todo: Consolidate with existing code in struct Photoshop (jpgimage.hpp):
// Extend this helper to a proper class with all required functionality,
Expand Down
1 change: 0 additions & 1 deletion src/quicktimevideo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
// + standard includes
#include <array>
#include <cmath>
#include <iostream>
#include <string>
// *****************************************************************************
// class member definitions
Expand Down
1 change: 0 additions & 1 deletion src/rafimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "safe_op.hpp"
#include "tiffimage.hpp"

#include <cinttypes>
#include <iostream>

// *****************************************************************************
Expand Down
1 change: 0 additions & 1 deletion src/sigmamn_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "value.hpp"

// + standard includes
#include <sstream>
#include <string>

// *****************************************************************************
Expand Down
3 changes: 0 additions & 3 deletions src/tags.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
// included header files
#include "tags.hpp"

#include "canonmn_int.hpp"
#include "casiomn_int.hpp"
#include "convert.hpp"
#include "error.hpp"
#include "i18n.h" // NLS support.
#include "tags_int.hpp"
Expand Down
2 changes: 2 additions & 0 deletions src/tgaimage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@
#include "futils.hpp"
#include "image.hpp"

#ifdef EXIV2_DEBUG_MESSAGES
#include <iostream>
#endif

// *****************************************************************************
// class member definitions
Expand Down
3 changes: 2 additions & 1 deletion src/tiffcomposite_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
// included header files
#include "config.h"

#include "tiffcomposite_int.hpp"

#include "enforce.hpp"
#include "error.hpp"
#include "makernote_int.hpp"
#include "safe_op.hpp"
#include "sonymn_int.hpp"
#include "tiffcomposite_int.hpp"
#include "tiffimage_int.hpp"
#include "tiffvisitor_int.hpp"
#include "utils.hpp"
Expand Down
1 change: 0 additions & 1 deletion src/tiffimage_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "i18n.h" // NLS support.
#include "makernote_int.hpp"
#include "sonymn_int.hpp"
#include "tags_int.hpp"
#include "tiffvisitor_int.hpp"

#include <array>
Expand Down
7 changes: 2 additions & 5 deletions src/tiffvisitor_int.cpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
// SPDX-License-Identifier: GPL-2.0-or-later

// included header files
#include "config.h"
#include "tiffvisitor_int.hpp" // see bug #487

#include "config.h"
#include "enforce.hpp"
#include "exif.hpp"
#include "iptc.hpp"
#include "jpgimage.hpp"
#include "makernote_int.hpp"
#include "photoshop.hpp"
#include "safe_op.hpp"
#include "sonymn_int.hpp"
#include "tiffcomposite_int.hpp" // Do not change the order of these 2 includes,
#include "tiffimage_int.hpp"
#include "tiffvisitor_int.hpp" // see bug #487
#include "value.hpp"

#include <functional>
Expand Down
2 changes: 2 additions & 0 deletions src/tiffvisitor_int.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
// *****************************************************************************
// included header files
#include "exif.hpp"
#include "tiffcomposite_int.hpp" // Do not change the order of these 2 includes,
#include "tifffwd_int.hpp"
#include "tiffimage_int.hpp"
#include "types.hpp"

#include <array>
Expand Down
4 changes: 0 additions & 4 deletions src/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,15 @@
#include "enforce.hpp"
#include "futils.hpp"
#include "i18n.h" // for _exvGettext
#include "safe_op.hpp"
#include "utils.hpp"

// + standard includes
#include <array>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <numeric>
#include <sstream>
#include <utility>

// *****************************************************************************
namespace {
Expand Down
4 changes: 3 additions & 1 deletion src/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#endif

// + standard includes
#include <array>
#include <fstream>
#include <set>

Expand Down Expand Up @@ -45,6 +44,9 @@
#endif
#define _WIN64 1
#endif
#ifdef _MSC_VER
#include <array>
#endif
#elif defined(__APPLE__)
#include <mach-o/dyld.h>
#elif defined(__FreeBSD__)
Expand Down
2 changes: 2 additions & 0 deletions src/xmpsidecar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
#include "utils.hpp"
#include "xmp_exiv2.hpp"

#ifdef EXIV2_DEBUG_MESSAGES
#include <iostream>
#endif

namespace {
constexpr char xmlHeader[] = "<?xpacket begin=\"\xef\xbb\xbf\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>\n";
Expand Down
1 change: 0 additions & 1 deletion unitTests/test_XmpKey.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-or-later

#include <gtest/gtest.h>
#include <exiv2/error.hpp>
#include <exiv2/properties.hpp>

using namespace Exiv2;
Expand Down
Loading

0 comments on commit a86a481

Please sign in to comment.