mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-04 15:19:09 +00:00
ControllerInterface/Device: std::move strings in constructor where applicable
Allows callers to move std::string values into the constructor, potentially avoiding copies.
This commit is contained in:
parent
1355b43fd2
commit
246e2a77ce
1 changed files with 2 additions and 2 deletions
|
@ -156,8 +156,8 @@ class DeviceQualifier
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DeviceQualifier() : cid(-1) {}
|
DeviceQualifier() : cid(-1) {}
|
||||||
DeviceQualifier(const std::string& _source, const int _id, const std::string& _name)
|
DeviceQualifier(std::string source_, const int id_, std::string name_)
|
||||||
: source(_source), cid(_id), name(_name)
|
: source(std::move(source_)), cid(id_), name(std::move(name_))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
void FromDevice(const Device* const dev);
|
void FromDevice(const Device* const dev);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue