Skip to content

Commit d4ffcb9

Browse files
committed
utils are in Internal namespace
1 parent cc79051 commit d4ffcb9

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

src/epsimage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// *****************************************************************************
3030
namespace {
3131
using namespace Exiv2;
32-
using Exiv2::byte;
32+
using namespace Exiv2::Internal;
3333

3434
// signature of DOS EPS
3535
constexpr auto dosEpsSignature = std::string_view("\xC5\xD0\xD3\xC6");

src/utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <cctype>
55
#include <iterator>
66

7-
namespace Exiv2 {
7+
namespace Exiv2::Internal {
88

99
std::string upper(const std::string& str) {
1010
std::string result;
@@ -18,4 +18,4 @@ std::string lower(const std::string& a) {
1818
return b;
1919
}
2020

21-
} // namespace Exiv2
21+
} // namespace Exiv2::Internal

src/utils.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
#include <string>
55
#include <string_view>
66

7-
namespace Exiv2 {
7+
namespace Exiv2::Internal {
8+
89
constexpr bool startsWith(std::string_view s, std::string_view start) {
910
return s.find(start) == 0;
1011
}
@@ -15,6 +16,6 @@ std::string upper(const std::string& str);
1516
/// @brief Returns the lowercase version of \b str
1617
std::string lower(const std::string& str);
1718

18-
} // namespace Exiv2
19+
} // namespace Exiv2::Internal
1920

2021
#endif // EXIV2_UTILS_HPP

src/xmpsidecar.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ void XmpSidecar::readMetadata() {
8484
} // XmpSidecar::readMetadata
8585

8686
static bool matchi(const std::string& key, const char* substr) {
87-
return lower(key).find(substr) != std::string::npos;
87+
return Internal::lower(key).find(substr) != std::string::npos;
8888
}
8989

9090
void XmpSidecar::writeMetadata() {

unitTests/test_utils.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <gtest/gtest.h>
66

7-
using namespace Exiv2;
7+
using namespace Exiv2::Internal;
88

99
TEST(stringUtils, startsWithReturnsTrue) {
1010
ASSERT_TRUE(startsWith("Exiv2 rocks", "Exiv2"));

0 commit comments

Comments
 (0)