1
0
Fork 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
1 changed files with 10 additions and 1 deletions

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)