mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 14:52:45 +01:00
input_engine: Pass LedStatus by const reference
Avoids copies where reasonably applicable
This commit is contained in:
parent
38f3442ea5
commit
985599e485
3 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue