[Scummvm-cvs-logs] SF.net SVN: scummvm: [32656] scummvm/trunk/common/hash-str.h
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Tue Jun 10 23:50:07 CEST 2008
Revision: 32656
http://scummvm.svn.sourceforge.net/scummvm/?rev=32656&view=rev
Author: fingolfin
Date: 2008-06-10 14:50:07 -0700 (Tue, 10 Jun 2008)
Log Message:
-----------
Re-enabled default Hash<String> template
Modified Paths:
--------------
scummvm/trunk/common/hash-str.h
Modified: scummvm/trunk/common/hash-str.h
===================================================================
--- scummvm/trunk/common/hash-str.h 2008-06-10 21:44:59 UTC (rev 32655)
+++ scummvm/trunk/common/hash-str.h 2008-06-10 21:50:07 UTC (rev 32656)
@@ -57,11 +57,12 @@
-typedef HashMap<String, String, IgnoreCase_Hash, IgnoreCase_EqualTo> StringMap;
-
-
-#if 0
// Specalization of the Hash functor for String objects.
+// We do case sensitve hashing here, because that is what
+// the default EqualTo is compatible with. If one wants to use
+// case insensitve hashing, then only because one wants to use
+// IgnoreCase_EqualTo, and then one has to specify a custom
+// hash anyway.
template <>
struct Hash<String> {
uint operator()(const String& s) const {
@@ -75,9 +76,12 @@
return hashit(s);
}
};
-#endif
+// String map -- by default case insensitive
+typedef HashMap<String, String, IgnoreCase_Hash, IgnoreCase_EqualTo> StringMap;
+
+
} // End of namespace Common
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list