aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2022-11-09 17:21:29 +0100
committerGitHub <noreply@github.com>2022-11-09 17:21:29 +0100
commit1fffbdb232e0e45b4dc17f739fa219eea8d3fc30 (patch)
tree38d81853f85ba50d9a76b2e2d4677cec8c3a6c1e
parent0850bb2c266aca68533faa8f551d8c9cfae7c951 (diff)
parentc3824e9e1b9da2d8d7d62012e4ba3542eb256e30 (diff)
Merge pull request #22111 from Rechi/clang_tidy/performance
[clang-tidy] fix performance-* warnings
-rw-r--r--xbmc/games/addons/input/GameClientInput.cpp8
-rw-r--r--xbmc/games/addons/input/GameClientInput.h6
2 files changed, 8 insertions, 6 deletions
diff --git a/xbmc/games/addons/input/GameClientInput.cpp b/xbmc/games/addons/input/GameClientInput.cpp
index ee478c79f3..edfa031ba1 100644
--- a/xbmc/games/addons/input/GameClientInput.cpp
+++ b/xbmc/games/addons/input/GameClientInput.cpp
@@ -294,7 +294,8 @@ int CGameClientInput::GetPlayerLimit() const
return m_topology->GetPlayerLimit();
}
-bool CGameClientInput::ConnectController(const std::string& portAddress, ControllerPtr controller)
+bool CGameClientInput::ConnectController(const std::string& portAddress,
+ const ControllerPtr& controller)
{
// Validate parameters
if (portAddress.empty() || !controller)
@@ -435,7 +436,7 @@ bool CGameClientInput::HasAgent() const
}
bool CGameClientInput::OpenKeyboard(const ControllerPtr& controller,
- PERIPHERALS::PeripheralPtr keyboard)
+ const PERIPHERALS::PeripheralPtr& keyboard)
{
using namespace JOYSTICK;
@@ -503,7 +504,8 @@ void CGameClientInput::CloseKeyboard()
}
}
-bool CGameClientInput::OpenMouse(const ControllerPtr& controller, PERIPHERALS::PeripheralPtr mouse)
+bool CGameClientInput::OpenMouse(const ControllerPtr& controller,
+ const PERIPHERALS::PeripheralPtr& mouse)
{
using namespace JOYSTICK;
diff --git a/xbmc/games/addons/input/GameClientInput.h b/xbmc/games/addons/input/GameClientInput.h
index 8024d6e632..be7e71c9b9 100644
--- a/xbmc/games/addons/input/GameClientInput.h
+++ b/xbmc/games/addons/input/GameClientInput.h
@@ -69,7 +69,7 @@ public:
bool SupportsKeyboard() const;
bool SupportsMouse() const;
int GetPlayerLimit() const;
- bool ConnectController(const std::string& portAddress, ControllerPtr controller);
+ bool ConnectController(const std::string& portAddress, const ControllerPtr& controller);
bool DisconnectController(const std::string& portAddress);
void SavePorts();
void ResetPorts();
@@ -79,12 +79,12 @@ public:
void CloseJoysticks(PERIPHERALS::EventLockHandlePtr& inputHandlingLock);
// Keyboard functions
- bool OpenKeyboard(const ControllerPtr& controller, PERIPHERALS::PeripheralPtr keyboard);
+ bool OpenKeyboard(const ControllerPtr& controller, const PERIPHERALS::PeripheralPtr& keyboard);
bool IsKeyboardOpen() const;
void CloseKeyboard();
// Mouse functions
- bool OpenMouse(const ControllerPtr& controller, PERIPHERALS::PeripheralPtr mouse);
+ bool OpenMouse(const ControllerPtr& controller, const PERIPHERALS::PeripheralPtr& mouse);
bool IsMouseOpen() const;
void CloseMouse();