MCPcopy Create free account
hub / github.com/ceph/ceph / increment_slow

Method increment_slow

src/include/cpp-btree/btree.h:1737–1757  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1735// btree_iterator methods
1736template <typename N, typename R, typename P>
1737void btree_iterator<N, R, P>::increment_slow() {
1738 if (node->leaf()) {
1739 assert(position >= node->count());
1740 btree_iterator save(*this);
1741 while (position == node->count() && !node->is_root()) {
1742 assert(node->parent()->child(node->position()) == node);
1743 position = node->position();
1744 node = node->parent();
1745 }
1746 if (position == node->count()) {
1747 *this = save;
1748 }
1749 } else {
1750 assert(position < node->count());
1751 node = node->child(position + 1);
1752 while (!node->leaf()) {
1753 node = node->child(0);
1754 }
1755 position = 0;
1756 }
1757}
1758
1759template <typename N, typename R, typename P>
1760void btree_iterator<N, R, P>::decrement_slow() {

Callers

nothing calls this directly

Calls 7

assertFunction · 0.85
leafMethod · 0.80
childMethod · 0.80
countMethod · 0.45
is_rootMethod · 0.45
parentMethod · 0.45
positionMethod · 0.45

Tested by

no test coverage detected