diff options
Diffstat (limited to 'vespalib')
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/datastore.h | 3 | ||||
-rw-r--r-- | vespalib/src/vespa/vespalib/datastore/datastore.hpp | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/vespalib/src/vespa/vespalib/datastore/datastore.h b/vespalib/src/vespa/vespalib/datastore/datastore.h index e67d9049f0b..686b07766ac 100644 --- a/vespalib/src/vespa/vespalib/datastore/datastore.h +++ b/vespalib/src/vespa/vespalib/datastore/datastore.h @@ -108,7 +108,8 @@ public: DataStore(const DataStore &rhs) = delete; DataStore &operator=(const DataStore &rhs) = delete; DataStore(); - DataStore(BufferTypeUP type); + explicit DataStore(uint32_t min_arrays); + explicit DataStore(BufferTypeUP type); ~DataStore(); EntryRef addEntry(const EntryType &e); diff --git a/vespalib/src/vespa/vespalib/datastore/datastore.hpp b/vespalib/src/vespa/vespalib/datastore/datastore.hpp index b66a3b78603..f4e37804317 100644 --- a/vespalib/src/vespa/vespalib/datastore/datastore.hpp +++ b/vespalib/src/vespa/vespalib/datastore/datastore.hpp @@ -138,6 +138,12 @@ DataStore<EntryType, RefT>::DataStore() } template <typename EntryType, typename RefT> +DataStore<EntryType, RefT>::DataStore(uint32_t min_arrays) + : DataStore(std::make_unique<BufferType<EntryType>>(1, min_arrays, RefType::offsetSize())) +{ +} + +template <typename EntryType, typename RefT> DataStore<EntryType, RefT>::DataStore(BufferTypeUP type) : ParentType(), _type(std::move(type)) |