refactor: make block_cache_byte_buffer_factory internal

This commit is contained in:
Marcus Holland-Moritz 2025-04-15 14:17:05 +02:00
parent b0bc9b20c4
commit be348451c7
4 changed files with 9 additions and 8 deletions

View File

@ -91,7 +91,6 @@ add_library(
add_library(
dwarfs_reader
src/reader/block_cache_byte_buffer_factory.cpp
src/reader/block_cache_options.cpp
src/reader/block_range.cpp
src/reader/filesystem_options.cpp
@ -101,6 +100,7 @@ add_library(
src/reader/mlock_mode.cpp
src/reader/internal/block_cache.cpp
src/reader/internal/block_cache_byte_buffer_factory.cpp
src/reader/internal/cached_block.cpp
src/reader/internal/filesystem_parser.cpp
src/reader/internal/inode_reader_v2.cpp

View File

@ -32,7 +32,7 @@
#include <dwarfs/reader/block_cache_options.h>
namespace dwarfs::reader {
namespace dwarfs::reader::internal {
class block_cache_byte_buffer_factory {
public:
@ -40,4 +40,4 @@ class block_cache_byte_buffer_factory {
static byte_buffer_factory create(block_cache_allocation_mode mode);
};
} // namespace dwarfs::reader
} // namespace dwarfs::reader::internal

View File

@ -52,7 +52,6 @@
#include <dwarfs/logger.h>
#include <dwarfs/mmif.h>
#include <dwarfs/performance_monitor.h>
#include <dwarfs/reader/block_cache_byte_buffer_factory.h>
#include <dwarfs/reader/block_cache_options.h>
#include <dwarfs/reader/cache_tidy_config.h>
#include <dwarfs/scope_exit.h>
@ -61,6 +60,7 @@
#include <dwarfs/internal/fs_section.h>
#include <dwarfs/internal/worker_group.h>
#include <dwarfs/reader/internal/block_cache.h>
#include <dwarfs/reader/internal/block_cache_byte_buffer_factory.h>
#include <dwarfs/reader/internal/cached_block.h>
namespace dwarfs::reader::internal {

View File

@ -38,9 +38,10 @@
#endif
#include <dwarfs/malloc_byte_buffer.h>
#include <dwarfs/reader/block_cache_byte_buffer_factory.h>
namespace dwarfs::reader {
#include <dwarfs/reader/internal/block_cache_byte_buffer_factory.h>
namespace dwarfs::reader::internal {
namespace {
@ -160,7 +161,7 @@ class mmap_byte_buffer_impl : public mutable_byte_buffer_interface {
size_ += size;
}
internal::malloc_buffer& raw_buffer() override {
dwarfs::internal::malloc_buffer& raw_buffer() override {
throw std::runtime_error(
"operation not allowed on mmap buffer: raw_buffer");
}
@ -206,4 +207,4 @@ block_cache_byte_buffer_factory::create(block_cache_allocation_mode mode) {
std::make_shared<block_cache_byte_buffer_factory_impl>(mode)};
}
} // namespace dwarfs::reader
} // namespace dwarfs::reader::internal