mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 02:15:45 +02:00
fix: remove DenseSet::IteratorBase::TraverseApply (#4170)
Signed-off-by: kostas <kostas@dragonflydb.io>
This commit is contained in:
parent
b8c2dd888a
commit
a012539f2c
4 changed files with 29 additions and 48 deletions
|
@ -840,22 +840,4 @@ size_t DenseSet::SizeSlow() {
|
|||
return size_;
|
||||
}
|
||||
|
||||
size_t DenseSet::IteratorBase::TraverseApply(DensePtr* ptr, std::function<void(DensePtr*)> fun) {
|
||||
size_t links_traversed = 0;
|
||||
while (ptr->IsLink()) {
|
||||
DenseLinkKey* link = ptr->AsLink();
|
||||
fun(link);
|
||||
ptr = &link->next;
|
||||
++links_traversed;
|
||||
}
|
||||
|
||||
// The last ptr in the link always returns ptr->IsLink() = false
|
||||
DCHECK(!ptr->IsEmpty());
|
||||
DCHECK(ptr->IsObject());
|
||||
fun(ptr);
|
||||
++links_traversed;
|
||||
|
||||
return links_traversed;
|
||||
}
|
||||
|
||||
} // namespace dfly
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue