summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@online.no>2023-06-22 19:10:01 +0200
committerTor Egge <Tor.Egge@online.no>2023-06-22 19:10:01 +0200
commitc0f3d378afacf1884c3336175f316647ae2bdffe (patch)
treed2918d0774c954933d23d20acefcd98579203b57
parent3bef09482a1fcc1a55ff09c778921ea921028e24 (diff)
Avoid shadowing.
-rw-r--r--vespalib/src/tests/datastore/dynamic_array_buffer_type/dynamic_array_buffer_type_test.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/datastore/dynamic_array_buffer_type.h2
-rw-r--r--vespalib/src/vespa/vespalib/datastore/dynamic_array_buffer_type.hpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/vespalib/src/tests/datastore/dynamic_array_buffer_type/dynamic_array_buffer_type_test.cpp b/vespalib/src/tests/datastore/dynamic_array_buffer_type/dynamic_array_buffer_type_test.cpp
index 9c0432a7780..b0af2f56492 100644
--- a/vespalib/src/tests/datastore/dynamic_array_buffer_type/dynamic_array_buffer_type_test.cpp
+++ b/vespalib/src/tests/datastore/dynamic_array_buffer_type/dynamic_array_buffer_type_test.cpp
@@ -130,7 +130,7 @@ DynamicArrayBufferTypeTest::DynamicArrayBufferTypeTest()
: testing::Test(),
_buffer_type(3, ArrayStoreConfig::AllocSpec(0, 10, 0, 0.2), {}),
_entry_size(_buffer_type.entry_size()),
- _buffer_underflow_size(BufferType::buffer_underflow_size),
+ _buffer_underflow_size(_buffer_type.buffer_underflow_size()),
_buf_size(2 * _entry_size),
_buf_alloc(std::make_unique<char[]>(_buf_size + _buffer_underflow_size)),
_buf(_buf_alloc.get() + _buffer_underflow_size)
diff --git a/vespalib/src/vespa/vespalib/datastore/dynamic_array_buffer_type.h b/vespalib/src/vespa/vespalib/datastore/dynamic_array_buffer_type.h
index 7ee86b44876..daff28fcc85 100644
--- a/vespalib/src/vespa/vespalib/datastore/dynamic_array_buffer_type.h
+++ b/vespalib/src/vespa/vespalib/datastore/dynamic_array_buffer_type.h
@@ -32,7 +32,7 @@ public:
static constexpr size_t entry_min_align = std::max(alignof(uint32_t), alignof(ElemT));
using EntryMinAligner = Aligner<entry_min_align>;
- static constexpr uint32_t buffer_underflow_size = 64u;
+ static constexpr uint32_t dynamic_array_buffer_underflow_size = 64u;
protected:
static const ElemType& empty_entry() noexcept;
ElemType* get_entry(void *buffer, size_t offset) noexcept { return get_entry(buffer, offset, entry_size()); }
diff --git a/vespalib/src/vespa/vespalib/datastore/dynamic_array_buffer_type.hpp b/vespalib/src/vespa/vespalib/datastore/dynamic_array_buffer_type.hpp
index 57d5b81b0c7..df27e241def 100644
--- a/vespalib/src/vespa/vespalib/datastore/dynamic_array_buffer_type.hpp
+++ b/vespalib/src/vespa/vespalib/datastore/dynamic_array_buffer_type.hpp
@@ -9,7 +9,7 @@ namespace vespalib::datastore {
template <typename ElemT>
DynamicArrayBufferType<ElemT>::DynamicArrayBufferType(uint32_t array_size, const AllocSpec& spec, std::shared_ptr<alloc::MemoryAllocator> memory_allocator) noexcept
- : BufferTypeBase(calc_entry_size(array_size), buffer_underflow_size, array_size, spec.min_entries_in_buffer, spec.max_entries_in_buffer, spec.num_entries_for_new_buffer, spec.allocGrowFactor),
+ : BufferTypeBase(calc_entry_size(array_size), dynamic_array_buffer_underflow_size, array_size, spec.min_entries_in_buffer, spec.max_entries_in_buffer, spec.num_entries_for_new_buffer, spec.allocGrowFactor),
_memory_allocator(std::move(memory_allocator))
{
}