aboutsummaryrefslogtreecommitdiff
path: root/src/leveldb/db/db_iter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/leveldb/db/db_iter.cc')
-rw-r--r--src/leveldb/db/db_iter.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/leveldb/db/db_iter.cc b/src/leveldb/db/db_iter.cc
index 071a54e3f4..3b2035e9e3 100644
--- a/src/leveldb/db/db_iter.cc
+++ b/src/leveldb/db/db_iter.cc
@@ -161,12 +161,13 @@ void DBIter::Next() {
saved_key_.clear();
return;
}
+ // saved_key_ already contains the key to skip past.
+ } else {
+ // Store in saved_key_ the current key so we skip it below.
+ SaveKey(ExtractUserKey(iter_->key()), &saved_key_);
}
- // Temporarily use saved_key_ as storage for key to skip.
- std::string* skip = &saved_key_;
- SaveKey(ExtractUserKey(iter_->key()), skip);
- FindNextUserEntry(true, skip);
+ FindNextUserEntry(true, &saved_key_);
}
void DBIter::FindNextUserEntry(bool skipping, std::string* skip) {