ButtonManager: Pass strings by const reference

This commit is contained in:
Lioncash 2015-05-21 22:22:52 -04:00
parent 12493c332c
commit 8a2f70b2ef
2 changed files with 5 additions and 5 deletions

View file

@ -58,7 +58,7 @@ namespace ButtonManager
TRIGGER_R
};
static void AddBind(std::string dev, sBind *bind)
static void AddBind(const std::string& dev, sBind *bind)
{
auto it = m_controllers.find(dev);
if (it != m_controllers.end())
@ -156,7 +156,7 @@ namespace ButtonManager
}
return value;
}
bool GamepadEvent(std::string dev, int button, int action)
bool GamepadEvent(const std::string& dev, int button, int action)
{
auto it = m_controllers.find(dev);
if (it != m_controllers.end())
@ -165,7 +165,7 @@ namespace ButtonManager
m_controllers[dev] = new InputDevice(dev);
return m_controllers[dev]->PressEvent(button, action);
}
void GamepadAxisEvent(std::string dev, int axis, float value)
void GamepadAxisEvent(const std::string& dev, int axis, float value)
{
auto it = m_controllers.find(dev);
if (it != m_controllers.end())