aboutsummaryrefslogtreecommitdiff
path: root/db/db_iter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'db/db_iter.cc')
-rw-r--r--db/db_iter.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/db/db_iter.cc b/db/db_iter.cc
index 071a54e..3b2035e 100644
--- a/db/db_iter.cc
+++ b/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) {