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(const std::string& path) : m_file_path(path)
|
||||
GameFile::GameFile(std::string path) : m_file_path(std::move(path))
|
||||
{
|
||||
{
|
||||
std::string name, extension;
|
||||
|
|
|
@ -45,7 +45,7 @@ class GameFile final
|
|||
{
|
||||
public:
|
||||
GameFile();
|
||||
explicit GameFile(const std::string& path);
|
||||
explicit GameFile(std::string path);
|
||||
~GameFile();
|
||||
|
||||
bool IsValid() const;
|
||||
|
|
Loading…
Reference in New Issue