|
@@ -13,7 +13,9 @@
|
|
|
#include "dbg.h"
|
|
#include "dbg.h"
|
|
|
#include "cmd.h"
|
|
#include "cmd.h"
|
|
|
#include <string>
|
|
#include <string>
|
|
|
-#include <unordered_map>
|
|
|
|
|
|
|
+#include <tinystl/allocator.h>
|
|
|
|
|
+#include <tinystl/unordered_map.h>
|
|
|
|
|
+namespace stl = tinystl;
|
|
|
|
|
|
|
|
struct CmdContext
|
|
struct CmdContext
|
|
|
{
|
|
{
|
|
@@ -30,7 +32,7 @@ struct CmdContext
|
|
|
uint32_t cmd = bx::hashMurmur2A(_name, (uint32_t)strlen(_name) );
|
|
uint32_t cmd = bx::hashMurmur2A(_name, (uint32_t)strlen(_name) );
|
|
|
BX_CHECK(m_lookup.end() == m_lookup.find(cmd), "Command \"%s\" already exist.", _name);
|
|
BX_CHECK(m_lookup.end() == m_lookup.find(cmd), "Command \"%s\" already exist.", _name);
|
|
|
Func fn = { _fn, _userData };
|
|
Func fn = { _fn, _userData };
|
|
|
- m_lookup.insert(std::make_pair(cmd, fn) );
|
|
|
|
|
|
|
+ m_lookup.insert(stl::make_pair(cmd, fn) );
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void exec(const char* _cmd)
|
|
void exec(const char* _cmd)
|
|
@@ -82,7 +84,7 @@ struct CmdContext
|
|
|
void* m_userData;
|
|
void* m_userData;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- typedef std::unordered_map<uint32_t, Func> CmdLookup;
|
|
|
|
|
|
|
+ typedef stl::unordered_map<uint32_t, Func> CmdLookup;
|
|
|
CmdLookup m_lookup;
|
|
CmdLookup m_lookup;
|
|
|
};
|
|
};
|
|
|
|
|
|