diff options
author | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-09-08 18:38:27 +0200 |
---|---|---|
committer | madmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6> | 2012-09-08 18:38:27 +0200 |
commit | fbefff45b12b0e164d7f771275dd117cd47f943f (patch) | |
tree | 049c6fee52ff8bed8178a08f3b1a66204cc7e40b | |
parent | Added the ItemToString() and ItemTypeToString() functions. (diff) | |
download | cuberite-fbefff45b12b0e164d7f771275dd117cd47f943f.tar cuberite-fbefff45b12b0e164d7f771275dd117cd47f943f.tar.gz cuberite-fbefff45b12b0e164d7f771275dd117cd47f943f.tar.bz2 cuberite-fbefff45b12b0e164d7f771275dd117cd47f943f.tar.lz cuberite-fbefff45b12b0e164d7f771275dd117cd47f943f.tar.xz cuberite-fbefff45b12b0e164d7f771275dd117cd47f943f.tar.zst cuberite-fbefff45b12b0e164d7f771275dd117cd47f943f.zip |
-rw-r--r-- | source/BlockID.cpp | 11 |
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) |