[Scummvm-cvs-logs] CVS: scummvm/common config-manager.h,1.5,1.6 map.h,1.18,1.19

Max Horn fingolfin at users.sourceforge.net
Thu Nov 6 16:46:08 CET 2003


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv17845

Modified Files:
	config-manager.h map.h 
Log Message:
typo, gnaw gnaw

Index: config-manager.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/config-manager.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- config-manager.h	7 Nov 2003 00:03:55 -0000	1.5
+++ config-manager.h	7 Nov 2003 00:45:54 -0000	1.6
@@ -40,12 +40,12 @@
  *       of some specific (or any) configuration key changes.
  */
 class ConfigManager : public Singleton<ConfigManager> {
-	struct IgnoreCaseComperator {
+	struct IgnoreCaseComparator {
 	  int operator()(const String& x, const String& y) const { return scumm_stricmp(x.c_str(), y.c_str()); }
 	};
 	
 public:
-	class Domain : public Map<String, String, IgnoreCaseComperator> {
+	class Domain : public Map<String, String, IgnoreCaseComparator> {
 	public:
 		const String &get(const String &key) const {
 			Node *node = findNode(_root, key);
@@ -53,7 +53,7 @@
 		}
 	};
 
-	typedef Map<String, Domain, IgnoreCaseComperator> DomainMap;
+	typedef Map<String, Domain, IgnoreCaseComparator> DomainMap;
 
 	/** The name of the application domain (normally 'scummvm'). */
 	static const String kApplicationDomain;

Index: map.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/map.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- map.h	7 Nov 2003 00:02:47 -0000	1.18
+++ map.h	7 Nov 2003 00:45:54 -0000	1.19
@@ -27,12 +27,12 @@
 
 /**
  * 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 <class T>
-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 @@
  * @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 <class Key, class Value, class Comperator = DefaultComperator<Key> >
+template <class Key, class Value, class Comparator = DefaultComparator<Key> >
 class Map {
 protected:
 	struct Node {
@@ -64,12 +64,12 @@
 	Node *_header;
 
 private:
-	Map<Key, Value, Comperator>(const Map<Key, Value, Comperator> &map);
-	Map<Key, Value, Comperator> &operator =(const Map<Key, Value, Comperator> &map);
+	Map<Key, Value, Comparator>(const Map<Key, Value, Comparator> &map);
+	Map<Key, Value, Comparator> &operator =(const Map<Key, Value, Comparator> &map);
 
 public:
 	class ConstIterator {
-		friend class Map<Key, Value, Comperator>;
+		friend class Map<Key, Value, Comparator>;
 	protected:
 		Node *_node;
 		ConstIterator(Node *node) : _node(node) {}
@@ -105,12 +105,12 @@
 	};
 
 public:
-	Map<Key, Value, Comperator>() : _root(0) {
+	Map<Key, Value, Comparator>() : _root(0) {
 		_header = new Node();
 		_header->_right = _header->_left = _header;
 	}
 	
-	virtual ~Map<Key, Value, Comperator>() {
+	virtual ~Map<Key, Value, Comparator>() {
 		clearNodes(_root);
 		delete _header;
 		_root = _header = 0;
@@ -199,7 +199,7 @@
 		delete node;
 	}
 
-	void merge(const Map<Key, Value, Comperator> &map) {
+	void merge(const Map<Key, Value, Comparator> &map) {
 		merge(map._root);
 	}
 
@@ -228,7 +228,7 @@
 
 	/** 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 @@
 	}
 
 	Node *findOrCreateNode(Node *node, const Key &key) {
-		Comperator cmp;
+		Comparator cmp;
 		Node *prevNode = 0;
 		bool left = true;
 		while (node) {





More information about the Scummvm-git-logs mailing list