From b140375565878fb59235bfd2673913b96ae021fe Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Mon, 29 Sep 2014 23:13:01 +0200 Subject: [PATCH] ttl/ttl_test.cc: prefer prefix ++operator for non-primitive types Signed-off-by: Danny Al-Gaaf --- utilities/ttl/ttl_test.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/utilities/ttl/ttl_test.cc b/utilities/ttl/ttl_test.cc index e6d64e54e..66cabe8e3 100644 --- a/utilities/ttl/ttl_test.cc +++ b/utilities/ttl/ttl_test.cc @@ -120,7 +120,7 @@ class TtlTest { static FlushOptions flush_opts; WriteBatch batch; kv_it_ = kvmap_.begin(); - for (int i = 0; i < num_ops && kv_it_ != kvmap_.end(); i++, kv_it_++) { + for (int i = 0; i < num_ops && kv_it_ != kvmap_.end(); i++, ++kv_it_) { switch (batch_ops[i]) { case PUT: batch.Put(kv_it_->first, kv_it_->second); @@ -145,7 +145,7 @@ class TtlTest { static FlushOptions flush_opts; kv_it_ = kvmap_.begin(); advance(kv_it_, start_pos_map); - for (int i = 0; kv_it_ != kvmap_.end() && i < num_entries; i++, kv_it_++) { + for (int i = 0; kv_it_ != kvmap_.end() && i < num_entries; i++, ++kv_it_) { ASSERT_OK(cf == nullptr ? db_ttl_->Put(wopts, kv_it_->first, kv_it_->second) : db_ttl_->Put(wopts, cf, kv_it_->first, kv_it_->second)); @@ -207,7 +207,7 @@ class TtlTest { kv_it_ = kvmap_.begin(); advance(kv_it_, st_pos); std::string v; - for (int i = 0; kv_it_ != kvmap_.end() && i < span; i++, kv_it_++) { + for (int i = 0; kv_it_ != kvmap_.end() && i < span; i++, ++kv_it_) { Status s = (cf == nullptr) ? db_ttl_->Get(ropts, kv_it_->first, &v) : db_ttl_->Get(ropts, cf, kv_it_->first, &v); if (s.ok() != check) { @@ -252,7 +252,7 @@ class TtlTest { } else { // dbiter should have found out kvmap_[st_pos] for (int i = st_pos; kv_it_ != kvmap_.end() && i < st_pos + span; - i++, kv_it_++) { + i++, ++kv_it_) { ASSERT_TRUE(dbiter->Valid()); ASSERT_EQ(dbiter->value().compare(kv_it_->second), 0); dbiter->Next();