1
0

Fixed the case-sensitiveness of the item map.

git-svn-id: http://mc-server.googlecode.com/svn/trunk@848 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com 2012-09-08 16:38:27 +00:00
parent 8c43857b73
commit fbefff45b1

View File

@ -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)