input_engine: Pass LedStatus by const reference
Avoids copies where reasonably applicable
This commit is contained in:
parent
38f3442ea5
commit
985599e485
|
@ -266,7 +266,7 @@ class OutputDevice {
|
||||||
public:
|
public:
|
||||||
virtual ~OutputDevice() = default;
|
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) {
|
virtual VibrationError SetVibration([[maybe_unused]] const VibrationStatus& vibration_status) {
|
||||||
return VibrationError::NotSupported;
|
return VibrationError::NotSupported;
|
||||||
|
|
|
@ -114,7 +114,7 @@ public:
|
||||||
|
|
||||||
// Sets a led pattern for a controller
|
// Sets a led pattern for a controller
|
||||||
virtual void SetLeds([[maybe_unused]] const PadIdentifier& identifier,
|
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
|
// Sets rumble to a controller
|
||||||
virtual Common::Input::VibrationError SetRumble(
|
virtual Common::Input::VibrationError SetRumble(
|
||||||
|
|
|
@ -668,7 +668,7 @@ public:
|
||||||
explicit OutputFromIdentifier(PadIdentifier identifier_, InputEngine* input_engine_)
|
explicit OutputFromIdentifier(PadIdentifier identifier_, InputEngine* input_engine_)
|
||||||
: identifier(identifier_), input_engine(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);
|
input_engine->SetLeds(identifier, led_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue