Skip to content
Permalink
Browse files

ControllerInterface/Device: std::move strings in constructor where ap…

…plicable

Allows callers to move std::string values into the constructor,
potentially avoiding copies.
  • Loading branch information...
lioncash committed May 29, 2019
1 parent 1355b43 commit 246e2a77ceb7fb5ebf05286af07f598b3db40c2b
Showing with 2 additions and 2 deletions.
  1. +2 −2 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);

0 comments on commit 246e2a7

Please sign in to comment.
You can’t perform that action at this time.