mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-04 20:06:41 +01:00
UICommon/GameFile: std::move std::string argument in constructor
Allows for calling code to move the argument into the constructor, avoiding a copy.
This commit is contained in:
parent
8e65869484
commit
56faf750be
@ -113,7 +113,7 @@ GameFile::LookupUsingConfigLanguage(const std::map<DiscIO::Language, std::string
|
|||||||
|
|
||||||
GameFile::GameFile() = default;
|
GameFile::GameFile() = default;
|
||||||
|
|
||||||
GameFile::GameFile(const std::string& path) : m_file_path(path)
|
GameFile::GameFile(std::string path) : m_file_path(std::move(path))
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
std::string name, extension;
|
std::string name, extension;
|
||||||
|
@ -45,7 +45,7 @@ class GameFile final
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GameFile();
|
GameFile();
|
||||||
explicit GameFile(const std::string& path);
|
explicit GameFile(std::string path);
|
||||||
~GameFile();
|
~GameFile();
|
||||||
|
|
||||||
bool IsValid() const;
|
bool IsValid() const;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user