From 088849126c8c609c9afedab7dcd7ea806f732257 Mon Sep 17 00:00:00 2001 From: Marcus Holland-Moritz Date: Sat, 27 Jul 2024 13:57:19 +0200 Subject: [PATCH] refactor: move offset_cache to internal namespace --- include/dwarfs/{ => internal}/offset_cache.h | 4 ++-- src/dwarfs/internal/inode_reader_v2.cpp | 2 +- test/utils_test.cpp | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) rename include/dwarfs/{ => internal}/offset_cache.h (98%) diff --git a/include/dwarfs/offset_cache.h b/include/dwarfs/internal/offset_cache.h similarity index 98% rename from include/dwarfs/offset_cache.h rename to include/dwarfs/internal/offset_cache.h index 426d7a2d..a4b9d06a 100644 --- a/include/dwarfs/offset_cache.h +++ b/include/dwarfs/internal/offset_cache.h @@ -33,7 +33,7 @@ #include -namespace dwarfs { +namespace dwarfs::internal { template @@ -201,4 +201,4 @@ class basic_offset_cache { std::mutex mutable mx_; }; -} // namespace dwarfs +} // namespace dwarfs::internal diff --git a/src/dwarfs/internal/inode_reader_v2.cpp b/src/dwarfs/internal/inode_reader_v2.cpp index c7ccc52f..5b458558 100644 --- a/src/dwarfs/internal/inode_reader_v2.cpp +++ b/src/dwarfs/internal/inode_reader_v2.cpp @@ -36,9 +36,9 @@ #include #include #include +#include #include #include -#include #include #include diff --git a/test/utils_test.cpp b/test/utils_test.cpp index ac40cd9f..0c5970ed 100644 --- a/test/utils_test.cpp +++ b/test/utils_test.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include @@ -190,7 +190,8 @@ TEST(utils, shorten_path_utf8) { namespace { -using cache_type = basic_offset_cache; +using cache_type = + internal::basic_offset_cache; constexpr std::array const test_chunks{ 3, 15, 13, 1, 11, 6, 9, 15, 1, 16, 1, 13, 11, 16, 10, 14, 4, 14, 4, 16, 8, 12, 16, 2, 16, 10, 15, 15, 2, 15, 5, 8,