summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vespalib/src/vespa/vespalib/btree/btreeiterator.h15
-rw-r--r--vespalib/src/vespa/vespalib/btree/btreeiterator.hpp19
2 files changed, 13 insertions, 21 deletions
diff --git a/vespalib/src/vespa/vespalib/btree/btreeiterator.h b/vespalib/src/vespa/vespalib/btree/btreeiterator.h
index 153fb005f00..6524f697f4c 100644
--- a/vespalib/src/vespa/vespalib/btree/btreeiterator.h
+++ b/vespalib/src/vespa/vespalib/btree/btreeiterator.h
@@ -161,7 +161,7 @@ private:
/*
* Find the next leaf node, called by operator++() as needed.
*/
- void findNextLeafNode();
+ VESPA_DLL_LOCAL void findNextLeafNode();
/*
* Find the previous leaf node, called by operator--() as needed.
@@ -219,7 +219,18 @@ protected:
* Step iterator backwards. If at end then place it at last valid
* position in tree (cf. rbegin())
*/
- BTreeIteratorBase & operator--();
+ BTreeIteratorBase & operator--() {
+ if (_leaf.getNode() == nullptr) {
+ rbegin();
+ return *this;
+ }
+ if (_leaf.getIdx() > 0u) {
+ _leaf.decIdx();
+ return *this;
+ }
+ findPrevLeafNode();
+ return *this;
+ }
~BTreeIteratorBase();
BTreeIteratorBase(const BTreeIteratorBase &other);
diff --git a/vespalib/src/vespa/vespalib/btree/btreeiterator.hpp b/vespalib/src/vespa/vespalib/btree/btreeiterator.hpp
index 5f15ebc8b61..fdab3a94a5b 100644
--- a/vespalib/src/vespa/vespalib/btree/btreeiterator.hpp
+++ b/vespalib/src/vespa/vespalib/btree/btreeiterator.hpp
@@ -461,25 +461,6 @@ BTreeIteratorBase() noexcept
template <typename KeyT, typename DataT, typename AggrT,
uint32_t INTERNAL_SLOTS, uint32_t LEAF_SLOTS, uint32_t PATH_SIZE>
-BTreeIteratorBase<KeyT, DataT, AggrT, INTERNAL_SLOTS, LEAF_SLOTS, PATH_SIZE> &
-BTreeIteratorBase<KeyT, DataT, AggrT, INTERNAL_SLOTS, LEAF_SLOTS, PATH_SIZE>::
-operator--()
-{
- if (_leaf.getNode() == nullptr) {
- rbegin();
- return *this;
- }
- if (_leaf.getIdx() > 0u) {
- _leaf.decIdx();
- return *this;
- }
- findPrevLeafNode();
- return *this;
-}
-
-
-template <typename KeyT, typename DataT, typename AggrT,
- uint32_t INTERNAL_SLOTS, uint32_t LEAF_SLOTS, uint32_t PATH_SIZE>
size_t
BTreeIteratorBase<KeyT, DataT, AggrT, INTERNAL_SLOTS, LEAF_SLOTS, PATH_SIZE>::
size() const noexcept