diff options
author | Tor Egge <Tor.Egge@online.no> | 2022-02-11 11:34:01 +0100 |
---|---|---|
committer | Tor Egge <Tor.Egge@online.no> | 2022-02-11 11:34:01 +0100 |
commit | c8fa2a2bfbb70dd91fda604a857502a7a7a4ec1b (patch) | |
tree | 64ca4d42c6650eaeea85d69cbb7ba167873c2a4a /vespalib | |
parent | c91f726a5eef7e24b688db594620ef112e0a281e (diff) |
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)) |