From 246e2a77ceb7fb5ebf05286af07f598b3db40c2b Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 29 May 2019 18:46:44 -0400 Subject: [PATCH] ControllerInterface/Device: std::move strings in constructor where applicable Allows callers to move std::string values into the constructor, potentially avoiding copies. --- Source/Core/InputCommon/ControllerInterface/Device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/InputCommon/ControllerInterface/Device.h b/Source/Core/InputCommon/ControllerInterface/Device.h index 8281396515..b5a8695629 100644 --- a/Source/Core/InputCommon/ControllerInterface/Device.h +++ b/Source/Core/InputCommon/ControllerInterface/Device.h @@ -156,8 +156,8 @@ class DeviceQualifier { public: DeviceQualifier() : cid(-1) {} - DeviceQualifier(const std::string& _source, const int _id, const std::string& _name) - : source(_source), cid(_id), name(_name) + DeviceQualifier(std::string source_, const int id_, std::string name_) + : source(std::move(source_)), cid(id_), name(std::move(name_)) { } void FromDevice(const Device* const dev);