mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:49:25 +01:00
ButtonManager: Pass strings by const reference
This commit is contained in:
parent
12493c332c
commit
8a2f70b2ef
@ -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())
|
||||
|
@ -108,7 +108,7 @@ namespace ButtonManager
|
||||
void Init();
|
||||
bool GetButtonPressed(int padID, ButtonType button);
|
||||
float GetAxisValue(int padID, ButtonType axis);
|
||||
bool GamepadEvent(std::string dev, int button, int action);
|
||||
void GamepadAxisEvent(std::string dev, int axis, float value);
|
||||
bool GamepadEvent(const std::string& dev, int button, int action);
|
||||
void GamepadAxisEvent(const std::string& dev, int axis, float value);
|
||||
void Shutdown();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user