* Added Iterator::NextValuePointer().
* Made reference returned by _GetKey() const. That's sufficient. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33898 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
239222b236
commit
8d24cfc6c2
|
@ -288,7 +288,7 @@ protected:
|
|||
// strategy shortcuts
|
||||
inline Node* _Allocate(const Key& key, const Value& value);
|
||||
inline void _Free(Node* node);
|
||||
inline Key& _GetKey(Node* node) const;
|
||||
inline const Key& _GetKey(Node* node) const;
|
||||
inline Value& _GetValue(Node* node) const;
|
||||
inline AVLTreeNode* _GetAVLTreeNode(const Node* node) const;
|
||||
inline Node* _GetNode(const AVLTreeNode* node) const;
|
||||
|
@ -393,6 +393,13 @@ public:
|
|||
return Value();
|
||||
}
|
||||
|
||||
inline Value* NextValuePointer()
|
||||
{
|
||||
if (AVLTreeNode* node = fTreeIterator.Next())
|
||||
return &fParent->_GetValue(fParent->_GetNode(node));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
inline Value Previous()
|
||||
{
|
||||
if (AVLTreeNode* node = fTreeIterator.Previous())
|
||||
|
@ -597,7 +604,7 @@ _AVL_TREE_MAP_CLASS_NAME::_Free(Node* node)
|
|||
|
||||
// _GetKey
|
||||
_AVL_TREE_MAP_TEMPLATE_LIST
|
||||
inline Key&
|
||||
inline const Key&
|
||||
_AVL_TREE_MAP_CLASS_NAME::_GetKey(Node* node) const
|
||||
{
|
||||
return fStrategy.GetKey(node);
|
||||
|
|
Loading…
Reference in New Issue