From 561c993e8015c1e9a49718fd32e1fb7cb7ffb968 Mon Sep 17 00:00:00 2001 From: Anand Ananthabhotla Date: Thu, 6 Sep 2018 10:50:55 -0700 Subject: [PATCH] Fix a lint error due to unspecified move evaluation order 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)) In C++ 17, this will be safe if a draft proposal around function chaining rules is accepted. Test Plan: make check Reviewers: Subscribers: Tasks: Tags: --- 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 e488d4f6eeb..111f81daaf8 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) {