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:
Lioncash 2019-05-28 06:57:46 -04:00
parent 8e65869484
commit 56faf750be
2 changed files with 2 additions and 2 deletions

View File

@ -113,7 +113,7 @@ GameFile::LookupUsingConfigLanguage(const std::map<DiscIO::Language, std::string
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;

View File

@ -45,7 +45,7 @@ class GameFile final
{
public:
GameFile();
explicit GameFile(const std::string& path);
explicit GameFile(std::string path);
~GameFile();
bool IsValid() const;