summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/BlockID.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/BlockID.cpp b/source/BlockID.cpp
index a326d25d6..b1d00d391 100644
--- a/source/BlockID.cpp
+++ b/source/BlockID.cpp
@@ -26,7 +26,16 @@ bool g_BlockRequiresSpecialTool[256];
class cBlockIDMap
{
- typedef std::map<AString, std::pair<short, short> > ItemMap;
+ // Making the map case-insensitive:
+ struct Comparator
+ {
+ bool operator()(const AString & a_Item1, const AString & a_Item2)
+ {
+ return (NoCaseCompare(a_Item1, a_Item2) > 0);
+ }
+ } ;
+
+ typedef std::map<AString, std::pair<short, short>, Comparator> ItemMap;
public:
cBlockIDMap(void)