MCPcopy Create free account
hub / github.com/ElementsProject/elements / Next

Method Next

src/leveldb/table/merger.cc:55–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 }
54
55 void Next() override {
56 assert(Valid());
57
58 // Ensure that all children are positioned after key().
59 // If we are moving in the forward direction, it is already
60 // true for all of the non-current_ children since current_ is
61 // the smallest child and key() == current_->key(). Otherwise,
62 // we explicitly position the non-current_ children.
63 if (direction_ != kForward) {
64 for (int i = 0; i < n_; i++) {
65 IteratorWrapper* child = &children_[i];
66 if (child != current_) {
67 child->Seek(key());
68 if (child->Valid() &&
69 comparator_->Compare(key(), child->key()) == 0) {
70 child->Next();
71 }
72 }
73 }
74 direction_ = kForward;
75 }
76
77 current_->Next();
78 FindSmallest();
79 }
80
81 void Prev() override {
82 assert(Valid());

Callers

nothing calls this directly

Calls 5

keyFunction · 0.85
SeekMethod · 0.45
ValidMethod · 0.45
CompareMethod · 0.45
keyMethod · 0.45

Tested by

no test coverage detected