0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-25 16:22:35 +01:00

ircd::db: Use rvalue refs here.

This commit is contained in:
Jason Volk 2019-04-12 09:36:53 -07:00
parent 14c32a2075
commit 15bd7282c7
2 changed files with 4 additions and 4 deletions

View file

@ -51,8 +51,8 @@ namespace ircd::db
void for_each(const rocksdb::Cache *const &, const cache_closure &);
// Manually cache a key/value directly
bool insert(rocksdb::Cache &, const string_view &key, unique_buffer<const_buffer>);
bool insert(rocksdb::Cache *const &, const string_view &key, unique_buffer<const_buffer>);
bool insert(rocksdb::Cache &, const string_view &key, unique_buffer<const_buffer> &&);
bool insert(rocksdb::Cache *const &, const string_view &key, unique_buffer<const_buffer> &&);
// Manually cache a copy of key/value
bool insert(rocksdb::Cache &, const string_view &key, const string_view &value);

View file

@ -6296,7 +6296,7 @@ ircd::db::insert(rocksdb::Cache &cache,
bool
ircd::db::insert(rocksdb::Cache *const &cache,
const string_view &key,
unique_buffer<const_buffer> value)
unique_buffer<const_buffer> &&value)
{
return cache? insert(*cache, key, std::move(value)) : false;
}
@ -6304,7 +6304,7 @@ ircd::db::insert(rocksdb::Cache *const &cache,
bool
ircd::db::insert(rocksdb::Cache &cache,
const string_view &key,
unique_buffer<const_buffer> value)
unique_buffer<const_buffer> &&value)
{
const size_t value_size
{