Skip to content
Permalink
Browse files

UICommon/GameFile: std::move std::string argument in constructor

Allows for calling code to move the argument into the constructor,
avoiding a copy.
  • Loading branch information...
lioncash committed May 28, 2019
1 parent 8e65869 commit 56faf750be425f853369549da5acb0f5c1140e5c
Showing with 2 additions and 2 deletions.
  1. +1 −1 Source/Core/UICommon/GameFile.cpp
  2. +1 −1 Source/Core/UICommon/GameFile.h
@@ -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;

0 comments on commit 56faf75

Please sign in to comment.
You can’t perform that action at this time.