mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-21 14:23:02 +01:00
Use tinystl/unordered_map instead of c++11 only implementation
This commit is contained in:
@@ -13,7 +13,9 @@
|
||||
#include "dbg.h"
|
||||
#include "cmd.h"
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <tinystl/allocator.h>
|
||||
#include <tinystl/unordered_map.h>
|
||||
namespace stl = tinystl;
|
||||
|
||||
struct CmdContext
|
||||
{
|
||||
@@ -30,7 +32,7 @@ struct CmdContext
|
||||
uint32_t cmd = bx::hashMurmur2A(_name, (uint32_t)strlen(_name) );
|
||||
BX_CHECK(m_lookup.end() == m_lookup.find(cmd), "Command \"%s\" already exist.", _name);
|
||||
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)
|
||||
@@ -82,7 +84,7 @@ struct CmdContext
|
||||
void* m_userData;
|
||||
};
|
||||
|
||||
typedef std::unordered_map<uint32_t, Func> CmdLookup;
|
||||
typedef stl::unordered_map<uint32_t, Func> CmdLookup;
|
||||
CmdLookup m_lookup;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user