diff --git a/src/epsimage.cpp b/src/epsimage.cpp index 9db942f7..4c1d30d9 100644 --- a/src/epsimage.cpp +++ b/src/epsimage.cpp @@ -29,7 +29,7 @@ // ***************************************************************************** namespace { using namespace Exiv2; -using Exiv2::byte; +using namespace Exiv2::Internal; // signature of DOS EPS constexpr auto dosEpsSignature = std::string_view("\xC5\xD0\xD3\xC6"); diff --git a/src/utils.cpp b/src/utils.cpp index 57e9fa9d..111aff00 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -4,7 +4,7 @@ #include #include -namespace Exiv2 { +namespace Exiv2::Internal { std::string upper(const std::string& str) { std::string result; @@ -18,4 +18,4 @@ std::string lower(const std::string& a) { return b; } -} // namespace Exiv2 +} // namespace Exiv2::Internal diff --git a/src/utils.hpp b/src/utils.hpp index a8f21c43..1e16648d 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -4,7 +4,8 @@ #include #include -namespace Exiv2 { +namespace Exiv2::Internal { + constexpr bool startsWith(std::string_view s, std::string_view start) { return s.find(start) == 0; } @@ -15,6 +16,6 @@ std::string upper(const std::string& str); /// @brief Returns the lowercase version of \b str std::string lower(const std::string& str); -} // namespace Exiv2 +} // namespace Exiv2::Internal #endif // EXIV2_UTILS_HPP diff --git a/src/xmpsidecar.cpp b/src/xmpsidecar.cpp index 53485c10..ecb95027 100644 --- a/src/xmpsidecar.cpp +++ b/src/xmpsidecar.cpp @@ -84,7 +84,7 @@ void XmpSidecar::readMetadata() { } // XmpSidecar::readMetadata static bool matchi(const std::string& key, const char* substr) { - return lower(key).find(substr) != std::string::npos; + return Internal::lower(key).find(substr) != std::string::npos; } void XmpSidecar::writeMetadata() { diff --git a/unitTests/test_utils.cpp b/unitTests/test_utils.cpp index 2b39b005..f94638e3 100644 --- a/unitTests/test_utils.cpp +++ b/unitTests/test_utils.cpp @@ -4,7 +4,7 @@ #include -using namespace Exiv2; +using namespace Exiv2::Internal; TEST(stringUtils, startsWithReturnsTrue) { ASSERT_TRUE(startsWith("Exiv2 rocks", "Exiv2"));