mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-21 06:13:07 +01:00
Use tinystl/unordered_map instead of c++11 only implementation
This commit is contained in:
@@ -5,11 +5,14 @@
|
||||
|
||||
#include <memory.h>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "entry_p.h"
|
||||
#include "input.h"
|
||||
|
||||
#include <tinystl/allocator.h>
|
||||
#include <tinystl/unordered_map.h>
|
||||
namespace stl = tinystl;
|
||||
|
||||
struct Mouse
|
||||
{
|
||||
Mouse()
|
||||
@@ -112,12 +115,12 @@ struct Input
|
||||
|
||||
void addBindings(const char* _name, const InputBinding* _bindings)
|
||||
{
|
||||
m_inputBindingsMap.insert(std::make_pair(_name, _bindings) );
|
||||
m_inputBindingsMap.insert(stl::make_pair(_name, _bindings) );
|
||||
}
|
||||
|
||||
void removeBindings(const char* _name)
|
||||
{
|
||||
m_inputBindingsMap.erase(_name);
|
||||
m_inputBindingsMap.erase(m_inputBindingsMap.find(_name));
|
||||
}
|
||||
|
||||
void process(const InputBinding* _bindings)
|
||||
@@ -169,7 +172,7 @@ struct Input
|
||||
m_keyboard.reset();
|
||||
}
|
||||
|
||||
typedef std::unordered_map<std::string, const InputBinding*> InputBindingMap;
|
||||
typedef stl::unordered_map<const char*, const InputBinding*> InputBindingMap;
|
||||
InputBindingMap m_inputBindingsMap;
|
||||
Mouse m_mouse;
|
||||
Keyboard m_keyboard;
|
||||
|
||||
Reference in New Issue
Block a user