From 2b92d22bda767c7c723935c357bea474f8e2d2f8 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 13 Dec 2021 09:05:23 -0500 Subject: input_engine: std::move engine name where applicable We can allow the name to be moved into, allowing allocations to be avoided. --- src/input_common/drivers/gc_adapter.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/input_common/drivers/gc_adapter.h') diff --git a/src/input_common/drivers/gc_adapter.h b/src/input_common/drivers/gc_adapter.h index 8dc51d2e5..3c4f0396c 100644 --- a/src/input_common/drivers/gc_adapter.h +++ b/src/input_common/drivers/gc_adapter.h @@ -22,10 +22,10 @@ namespace InputCommon { class LibUSBContext; class LibUSBDeviceHandle; -class GCAdapter : public InputCommon::InputEngine { +class GCAdapter : public InputEngine { public: - explicit GCAdapter(const std::string& input_engine_); - ~GCAdapter(); + explicit GCAdapter(std::string input_engine_); + ~GCAdapter() override; Common::Input::VibrationError SetRumble( const PadIdentifier& identifier, const Common::Input::VibrationStatus vibration) override; -- cgit v1.2.3 From 38f3442ea56a3ac9447924c015c2a9ade0f5bb83 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 13 Dec 2021 09:09:03 -0500 Subject: input_engine: Pass VibrationStatus by const reference in SetRumble() Avoids creating copies of the struct where not necessary. --- src/input_common/drivers/gc_adapter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/input_common/drivers/gc_adapter.h') diff --git a/src/input_common/drivers/gc_adapter.h b/src/input_common/drivers/gc_adapter.h index 3c4f0396c..7ce1912a3 100644 --- a/src/input_common/drivers/gc_adapter.h +++ b/src/input_common/drivers/gc_adapter.h @@ -28,7 +28,7 @@ public: ~GCAdapter() override; Common::Input::VibrationError SetRumble( - const PadIdentifier& identifier, const Common::Input::VibrationStatus vibration) override; + const PadIdentifier& identifier, const Common::Input::VibrationStatus& vibration) override; /// Used for automapping features std::vector GetInputDevices() const override; -- cgit v1.2.3