From f98bbe193e0093aca8d8957cec82fdbd28639915 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Thu, 20 Apr 2017 00:12:52 +0200 Subject: Fix various copy instead of const ref reported by cppcheck (part 3) (#5616) * Also remove 2 non declared but defined functions * Make some functions around const ref changes const --- src/client/joystick_controller.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/client/joystick_controller.cpp') diff --git a/src/client/joystick_controller.cpp b/src/client/joystick_controller.cpp index 3e1442793..cb9d64b9f 100644 --- a/src/client/joystick_controller.cpp +++ b/src/client/joystick_controller.cpp @@ -185,7 +185,8 @@ void JoystickController::onJoystickConnect(const std::vector m_joystick_id = id; } -void JoystickController::setLayoutFromControllerName(std::string name) { +void JoystickController::setLayoutFromControllerName(const std::string &name) +{ if (lowercase(name).find("xbox") != std::string::npos) { m_layout = create_xbox_layout(); } else { -- cgit v1.2.3