citra-emu
/
citra
Archived
1
0
Fork 0

Merge pull request #4465 from lioncash/move

kernel/shared_memory: std::move the string parameter in SetName()
This commit is contained in:
Weiyi Wang 2018-11-24 11:08:06 -05:00 committed by GitHub
commit 8d92278cc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
#pragma once #pragma once
#include <string> #include <string>
#include <utility>
#include "common/common_types.h" #include "common/common_types.h"
#include "core/hle/kernel/object.h" #include "core/hle/kernel/object.h"
#include "core/hle/kernel/process.h" #include "core/hle/kernel/process.h"
@ -21,7 +22,7 @@ public:
return name; return name;
} }
void SetName(std::string name) { void SetName(std::string name) {
this->name = name; this->name = std::move(name);
} }
static const HandleType HANDLE_TYPE = HandleType::SharedMemory; static const HandleType HANDLE_TYPE = HandleType::SharedMemory;