input_engine: Pass LedStatus by const reference

Avoids copies where reasonably applicable
This commit is contained in:
Lioncash 2021-12-13 09:20:55 -05:00
parent 38f3442ea5
commit 985599e485
3 changed files with 3 additions and 3 deletions

View File

@ -266,7 +266,7 @@ class OutputDevice {
public:
virtual ~OutputDevice() = default;
virtual void SetLED([[maybe_unused]] LedStatus led_status) {}
virtual void SetLED([[maybe_unused]] const LedStatus& led_status) {}
virtual VibrationError SetVibration([[maybe_unused]] const VibrationStatus& vibration_status) {
return VibrationError::NotSupported;

View File

@ -114,7 +114,7 @@ public:
// Sets a led pattern for a controller
virtual void SetLeds([[maybe_unused]] const PadIdentifier& identifier,
[[maybe_unused]] const Common::Input::LedStatus led_status) {}
[[maybe_unused]] const Common::Input::LedStatus& led_status) {}
// Sets rumble to a controller
virtual Common::Input::VibrationError SetRumble(

View File

@ -668,7 +668,7 @@ public:
explicit OutputFromIdentifier(PadIdentifier identifier_, InputEngine* input_engine_)
: identifier(identifier_), input_engine(input_engine_) {}
virtual void SetLED(Common::Input::LedStatus led_status) {
virtual void SetLED(const Common::Input::LedStatus& led_status) {
input_engine->SetLeds(identifier, led_status);
}