diff --git a/Source/Core/DolphinWX/Android/ButtonManager.cpp b/Source/Core/DolphinWX/Android/ButtonManager.cpp index 53e64513ba..b96c263df6 100644 --- a/Source/Core/DolphinWX/Android/ButtonManager.cpp +++ b/Source/Core/DolphinWX/Android/ButtonManager.cpp @@ -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()) diff --git a/Source/Core/DolphinWX/Android/ButtonManager.h b/Source/Core/DolphinWX/Android/ButtonManager.h index fbb3ab1e2c..7a68df1ffd 100644 --- a/Source/Core/DolphinWX/Android/ButtonManager.h +++ b/Source/Core/DolphinWX/Android/ButtonManager.h @@ -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(); }