diff options
author | Geir Storli <geirst@yahooinc.com> | 2022-02-11 12:37:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-11 12:37:24 +0100 |
commit | 24916c4ab5b2e4786c7814ad398384272f215c58 (patch) | |
tree | cd67821167e7154c8f2634484dcce5510d2ab71d /vespalib | |
parent | b85edf5d732c4ceaca4012c15e7755e6e690bdf2 (diff) | |
parent | c8fa2a2bfbb70dd91fda604a857502a7a7a4ec1b (diff) |
Merge pull request #21147 from vespa-engine/toregge/move-memory-allocator-to-be-last-argument-for-unique-store-constructor
Move memory allocator argument to last position in unique store constructor.
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/unique_store.h | 2 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/unique_store.hpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store.h b/vespalib/src/vespa/vespalib/datastore/unique_store.h index 281b719deea..81034ab4210 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store.h +++ b/vespalib/src/vespa/vespalib/datastore/unique_store.h @@ -50,7 +50,7 @@ private: public: UniqueStore(std::shared_ptr<alloc::MemoryAllocator> memory_allocator); - UniqueStore(std::shared_ptr<alloc::MemoryAllocator> memory_allocator, std::unique_ptr<IUniqueStoreDictionary> dict); + UniqueStore(std::unique_ptr<IUniqueStoreDictionary> dict, std::shared_ptr<alloc::MemoryAllocator> memory_allocator); ~UniqueStore(); void set_dictionary(std::unique_ptr<IUniqueStoreDictionary> dict); UniqueStoreAddResult add(EntryConstRefType value); diff --git a/vespalib/src/vespa/vespalib/datastore/unique_store.hpp b/vespalib/src/vespa/vespalib/datastore/unique_store.hpp index 06a2f288673..b1a7db56545 100644 --- a/vespalib/src/vespa/vespalib/datastore/unique_store.hpp +++ b/vespalib/src/vespa/vespalib/datastore/unique_store.hpp @@ -28,12 +28,12 @@ using DefaultUniqueStoreDictionary = UniqueStoreDictionary<DefaultDictionary>; template <typename EntryT, typename RefT, typename Compare, typename Allocator> UniqueStore<EntryT, RefT, Compare, Allocator>::UniqueStore(std::shared_ptr<alloc::MemoryAllocator> memory_allocator) - : UniqueStore<EntryT, RefT, Compare, Allocator>(std::move(memory_allocator), std::make_unique<uniquestore::DefaultUniqueStoreDictionary>(std::unique_ptr<EntryComparator>())) + : UniqueStore<EntryT, RefT, Compare, Allocator>(std::make_unique<uniquestore::DefaultUniqueStoreDictionary>(std::unique_ptr<EntryComparator>()), std::move(memory_allocator)) { } template <typename EntryT, typename RefT, typename Compare, typename Allocator> -UniqueStore<EntryT, RefT, Compare, Allocator>::UniqueStore(std::shared_ptr<alloc::MemoryAllocator> memory_allocator, std::unique_ptr<IUniqueStoreDictionary> dict) +UniqueStore<EntryT, RefT, Compare, Allocator>::UniqueStore(std::unique_ptr<IUniqueStoreDictionary> dict, std::shared_ptr<alloc::MemoryAllocator> memory_allocator) : _allocator(std::move(memory_allocator)), _store(_allocator.get_data_store()), _dict(std::move(dict)) |