Merge pull request #7137 from lioncash/copy

GameFile: Avoid copying map pairs in GetLanguages()
This commit is contained in:
Léo Lam 2018-06-19 22:57:29 +02:00 committed by GitHub
commit bdfc6de9fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)
languages.push_back(name.first);
return languages;
}