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