summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-08 18:38:27 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-08 18:38:27 +0200
commitfbefff45b12b0e164d7f771275dd117cd47f943f (patch)
tree049c6fee52ff8bed8178a08f3b1a66204cc7e40b /source
parentAdded the ItemToString() and ItemTypeToString() functions. (diff)
downloadcuberite-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
Diffstat (limited to 'source')
-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)