From ced618cf393e4e80bf78dfc60a2dafefeb898ff1 Mon Sep 17 00:00:00 2001 From: Anand Ananthabhotla Date: Thu, 6 Sep 2018 14:39:52 -0700 Subject: [PATCH] Fix a lint error due to unspecified move evaluation order (#4348) Summary: In C++ 11, the order of argument and move evaluation in a statement such as below is unspecified - foo(a.b).bar(std::move(a)) The compiler is free to evaluate std::move(a) first, and then a.b is unspecified. In C++ 17, this will be safe if a draft proposal around function chaining rules is accepted. Pull Request resolved: https://github.com/facebook/rocksdb/pull/4348 Differential Revision: D9688810 Pulled By: anand1976 fbshipit-source-id: e4651d0ca03dcf007e50371a0fc72c0d1e710fb4 --- db/range_del_aggregator.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/range_del_aggregator.cc b/db/range_del_aggregator.cc index e488d4f6e..111f81daa 100644 --- a/db/range_del_aggregator.cc +++ b/db/range_del_aggregator.cc @@ -495,7 +495,8 @@ Status RangeDelAggregator::AddTombstones( tombstone.end_key_ = largest->user_key(); } } - GetRangeDelMap(tombstone.seq_).AddTombstone(std::move(tombstone)); + auto seq = tombstone.seq_; + GetRangeDelMap(seq).AddTombstone(std::move(tombstone)); input->Next(); } if (!first_iter) {