Browse files

GameFile: Avoid copying map pairs in GetLanguages()

We can just reference the pairs instead of taking them by value,
avoiding copying std::string instances.
  • Loading branch information...
lioncash committed Jun 19, 2018
1 parent 18c3e03 commit d3ed750c9d72fe73ebcd40686500584fce3a238c
Showing with 1 addition and 1 deletion.
  1. +1 −1 Source/Core/UICommon/GameFile.cpp
@@ -308,7 +308,7 @@ std::vector<DiscIO::Language> GameFile::GetLanguages() const
std::vector<DiscIO::Language> languages;
// TODO: What if some languages don't have long names but have other strings?
for (std::pair<DiscIO::Language, std::string> name : m_long_names)
for (const auto& name : m_long_names)
return languages;

0 comments on commit d3ed750

Please sign in to comment.