From 8fd0aea602ce72c60911071af5c4b7f940390482 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 7 Jul 2011 15:31:12 +0200 Subject: [PATCH] AVLTreeMap fixes * AVLTreeMap::_GetKey(): Change return type from const Key& to Key, so the strategy can do that as well and doesn't have have a Key object in the node. * Fix the Auto strategy: It was using the undefined _GetKey() instead of GetKey(). --- headers/private/kernel/util/AVLTreeMap.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/headers/private/kernel/util/AVLTreeMap.h b/headers/private/kernel/util/AVLTreeMap.h index 0ff6c090d9..2405bb79b8 100644 --- a/headers/private/kernel/util/AVLTreeMap.h +++ b/headers/private/kernel/util/AVLTreeMap.h @@ -98,7 +98,7 @@ protected: // strategy shortcuts inline Node* _Allocate(const Key& key, const Value& value); inline void _Free(Node* node); - inline const Key& _GetKey(Node* node) const; + inline 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; @@ -486,7 +486,7 @@ _AVL_TREE_MAP_CLASS_NAME::_Free(Node* node) // _GetKey _AVL_TREE_MAP_TEMPLATE_LIST -inline const Key& +inline Key _AVL_TREE_MAP_CLASS_NAME::_GetKey(Node* node) const { return fStrategy.GetKey(node); @@ -644,12 +644,12 @@ public: inline int CompareKeyNode(const Key& a, const Node* b) const { - return fCompare(a, _GetKey(b)); + return fCompare(a, GetKey(b)); } inline int CompareNodes(const Node* a, const Node* b) const { - return fCompare(_GetKey(a), _GetKey(b)); + return fCompare(GetKey(a), GetKey(b)); } private: