From 0bae086c7b2eecbb5b3a37f35f22579691f4bdc5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 7 Nov 2003 00:45:54 +0000 Subject: typo, gnaw gnaw svn-id: r11172 --- common/map.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'common/map.h') diff --git a/common/map.h b/common/map.h index df7f42740a..d592a7b673 100644 --- a/common/map.h +++ b/common/map.h @@ -27,12 +27,12 @@ namespace Common { /** * Default comparison functor: compares to objects using their operators. - * Comparison functors ('comperators') are used by the Map template to - * compare keys. A non-standard comperator might e.g. be implemented to + * Comparison functors ('comparators') are used by the Map template to + * compare keys. A non-standard comparator might e.g. be implemented to * compare strings, ignoring the case. */ template -struct DefaultComperator { +struct DefaultComparator { int operator()(const T& x, const T& y) const { return (x < y) ? -1 : (y < x) ? +1 : 0; } }; @@ -48,7 +48,7 @@ struct DefaultComperator { * @todo Having unit tests for this class would be very desirable. There are a * big number of things which can go wrong in this code. */ -template > +template > class Map { protected: struct Node { @@ -64,12 +64,12 @@ protected: Node *_header; private: - Map(const Map &map); - Map &operator =(const Map &map); + Map(const Map &map); + Map &operator =(const Map &map); public: class ConstIterator { - friend class Map; + friend class Map; protected: Node *_node; ConstIterator(Node *node) : _node(node) {} @@ -105,12 +105,12 @@ public: }; public: - Map() : _root(0) { + Map() : _root(0) { _header = new Node(); _header->_right = _header->_left = _header; } - virtual ~Map() { + virtual ~Map() { clearNodes(_root); delete _header; _root = _header = 0; @@ -199,7 +199,7 @@ public: delete node; } - void merge(const Map &map) { + void merge(const Map &map) { merge(map._root); } @@ -228,7 +228,7 @@ protected: /** Find and return the node matching the given key, if any. */ Node *findNode(Node *node, const Key &key) const { - Comperator cmp; + Comparator cmp; while (node) { int val = cmp(key,node->_key); if (val == 0) @@ -242,7 +242,7 @@ protected: } Node *findOrCreateNode(Node *node, const Key &key) { - Comperator cmp; + Comparator cmp; Node *prevNode = 0; bool left = true; while (node) { -- cgit v1.2.3