aboutsummaryrefslogtreecommitdiff
path: root/common/hash-str.h
diff options
context:
space:
mode:
authorMax Horn2008-06-10 21:50:07 +0000
committerMax Horn2008-06-10 21:50:07 +0000
commit52747ff694c0f5110c33e7f970f4f8c13742a60d (patch)
tree0a6dc2203edcdd980dd8f5157b2b62b41c6b7218 /common/hash-str.h
parent009e26f813ca1eeb8f8c973b0d3f3e1ce66f26fd (diff)
downloadscummvm-rg350-52747ff694c0f5110c33e7f970f4f8c13742a60d.tar.gz
scummvm-rg350-52747ff694c0f5110c33e7f970f4f8c13742a60d.tar.bz2
scummvm-rg350-52747ff694c0f5110c33e7f970f4f8c13742a60d.zip
Re-enabled default Hash<String> template
svn-id: r32656
Diffstat (limited to 'common/hash-str.h')
-rw-r--r--common/hash-str.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/common/hash-str.h b/common/hash-str.h
index 5575735f1d..f64b62daed 100644
--- a/common/hash-str.h
+++ b/common/hash-str.h
@@ -57,11 +57,12 @@ struct IgnoreCase_Hash {
-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,7 +76,10 @@ struct Hash<const char *> {
return hashit(s);
}
};
-#endif
+
+// String map -- by default case insensitive
+typedef HashMap<String, String, IgnoreCase_Hash, IgnoreCase_EqualTo> StringMap;
+
} // End of namespace Common