diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-04-06 09:43:34 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-04-06 09:43:34 +0000 |
commit | 9336db3c0e70ebc3dab7c4cdd855eafabd814638 (patch) | |
tree | aacc0d5eede67b15e26a6490ab169843b6a38015 /vespalib | |
parent | ef1971a1deb1d79d120d2648d96188c77bc41003 (diff) |
Follow codestyle: getComp -> get_comp
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/tests/datastore/fixed_size_hash_map/fixed_size_hash_map_test.cpp | 8 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/fixed_size_hash_map.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/vespalib/src/tests/datastore/fixed_size_hash_map/fixed_size_hash_map_test.cpp b/vespalib/src/tests/datastore/fixed_size_hash_map/fixed_size_hash_map_test.cpp index edaf26bb66a..b32a9baf90c 100644 --- a/vespalib/src/tests/datastore/fixed_size_hash_map/fixed_size_hash_map_test.cpp +++ b/vespalib/src/tests/datastore/fixed_size_hash_map/fixed_size_hash_map_test.cpp @@ -108,7 +108,7 @@ DataStoreFixedSizeHashTest::insert(uint32_t key) { MyCompare comp(_store, key); std::function<EntryRef(void)> insert_entry([this, key]() -> EntryRef { return _allocator.allocate(key); }); - auto& result = _hash_map->add(_hash_map->getComp(comp), insert_entry); + auto& result = _hash_map->add(_hash_map->get_comp(comp), insert_entry); auto ref = result.first.load_relaxed(); auto &wrapped_entry = _allocator.get_wrapped(ref); EXPECT_EQ(key, wrapped_entry.value()); @@ -118,7 +118,7 @@ void DataStoreFixedSizeHashTest::remove(uint32_t key) { MyCompare comp(_store, key); - auto result = _hash_map->remove(_hash_map->getComp(comp)); + auto result = _hash_map->remove(_hash_map->get_comp(comp)); if (result != nullptr) { auto ref = result->first.load_relaxed(); auto &wrapped_entry = _allocator.get_wrapped(ref); @@ -131,7 +131,7 @@ bool DataStoreFixedSizeHashTest::has_key(uint32_t key) { MyCompare comp(_store, key); - auto result = _hash_map->find(_hash_map->getComp(comp)); + auto result = _hash_map->find(_hash_map->get_comp(comp)); if (result != nullptr) { auto ref = result->first.load_relaxed(); auto& wrapped_entry = _allocator.get_wrapped(ref); @@ -271,7 +271,7 @@ TEST_F(DataStoreFixedSizeHashTest, lookups_works_after_insert_and_remove) } for (auto &kv : expected) { MyCompare comp(_store, kv.first); - EXPECT_EQ(kv.second, _hash_map->find(_hash_map->getComp(comp)) != nullptr); + EXPECT_EQ(kv.second, _hash_map->find(_hash_map->get_comp(comp)) != nullptr); } } diff --git a/vespalib/src/vespa/vespalib/datastore/fixed_size_hash_map.h b/vespalib/src/vespa/vespalib/datastore/fixed_size_hash_map.h index b1c81744de2..101dd1bead3 100644 --- a/vespalib/src/vespa/vespalib/datastore/fixed_size_hash_map.h +++ b/vespalib/src/vespa/vespalib/datastore/fixed_size_hash_map.h @@ -119,7 +119,7 @@ public: FixedSizeHashMap(uint32_t module, uint32_t capacity, uint32_t num_shards, const FixedSizeHashMap &orig, const EntryComparator& comp); ~FixedSizeHashMap(); - ShardedHashComparator getComp(const EntryComparator& comp) { + ShardedHashComparator get_comp(const EntryComparator& comp) { return ShardedHashComparator(comp, EntryRef(), _num_shards); } |