diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-17 09:50:18 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2013-12-17 09:50:39 +0100 |
commit | cf920b657d11b0913ef5b16d0a07ff860ae36aaf (patch) | |
tree | a264d3b70d47acf8f7dbff57d22c926cfdb85d19 /src/leveldb/db/db_iter.cc | |
parent | a549842499e8aebcb1a9846eeaef9d02c32b1de6 (diff) | |
parent | ed873a301eeff8c021ba57c78fb702fd2b6f0452 (diff) |
Merge pull request #3405
55c6890 Squashed 'src/leveldb/' changes from 936b461..e991315 (Pieter Wuille)
Diffstat (limited to 'src/leveldb/db/db_iter.cc')
-rw-r--r-- | src/leveldb/db/db_iter.cc | 9 |
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) { |