Made fixes

This commit is contained in:
Vincent Gee 2014-11-04 20:05:39 -05:00
parent a91e5a2590
commit d3aaabc976

View file

@ -33,32 +33,39 @@
#include "platform/threads/mutex.h"
#endif
#ifndef USE_CLASSIC_SIMDICTIONARY
#include <string>
#include <unordered_map>
#include "TorqueConfig.h"
#endif
class SimObject;
#include "core/strings/stringFunctions.h"
struct my_hash {
inline size_t operator()(const char* val) const
{
return (long)val;
}
};
struct eqstr {
inline bool operator()(const char *s1, const char *s2) const {
return dStrcmp(s1, s2) == 0;
}
};
#ifndef USE_CLASSIC_SIMDICTIONARY
typedef std::unordered_map<const char * , SimObject*, my_hash, eqstr> StringDictDef;
#include "core/strings/stringFunctions.h"
struct DictionaryHash
{
inline size_t operator()(const char* val) const
{
return (long)val;
}
};
struct eqstr
{
inline bool operator()(const char *s1, const char *s2) const
{
return dStrcmp(s1, s2) == 0;
}
};
#endif
#ifndef USE_CLASSIC_SIMDICTIONARY
typedef std::unordered_map<const char * , SimObject*, DictionaryHash, eqstr> StringDictDef;
typedef std::unordered_map<U32 ,SimObject*> U32DictDef;
#endif