From 15bd7282c7db9e090dd1df5f0c25d55ff6b2a38d Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Fri, 12 Apr 2019 09:36:53 -0700 Subject: [PATCH] ircd::db: Use rvalue refs here. --- include/ircd/db/cache.h | 4 ++-- ircd/db.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/ircd/db/cache.h b/include/ircd/db/cache.h index 5d357dd18..6c995ecb8 100644 --- a/include/ircd/db/cache.h +++ b/include/ircd/db/cache.h @@ -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); - bool insert(rocksdb::Cache *const &, const string_view &key, unique_buffer); + bool insert(rocksdb::Cache &, const string_view &key, unique_buffer &&); + bool insert(rocksdb::Cache *const &, const string_view &key, unique_buffer &&); // Manually cache a copy of key/value bool insert(rocksdb::Cache &, const string_view &key, const string_view &value); diff --git a/ircd/db.cc b/ircd/db.cc index e591cd78d..bcc01d8af 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -6296,7 +6296,7 @@ ircd::db::insert(rocksdb::Cache &cache, bool ircd::db::insert(rocksdb::Cache *const &cache, const string_view &key, - unique_buffer value) + unique_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 value) + unique_buffer &&value) { const size_t value_size {