From 617484c8f191cb249ccf6b93e42e351c54892238 Mon Sep 17 00:00:00 2001 From: "Raphael S. Carvalho" Date: Thu, 21 May 2015 14:39:04 -0300 Subject: [PATCH] sstables: use u-ref to avoid copy of partitions Suggested-by: Tomasz Grabiec Signed-off-by: Raphael S. Carvalho --- sstables/sstables.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sstables/sstables.cc b/sstables/sstables.cc index e158e81de7..c6b181fb32 100644 --- a/sstables/sstables.cc +++ b/sstables/sstables.cc @@ -1047,7 +1047,7 @@ static future<> write_index_entry(file_writer& out, disk_string_view& static constexpr int BASE_SAMPLING_LEVEL = 128; static void prepare_summary(summary& s, const memtable& mt) { - auto all_partitions = mt.all_partitions(); + auto&& all_partitions = mt.all_partitions(); assert(all_partitions.size() >= 1); s.header.min_index_interval = BASE_SAMPLING_LEVEL;