mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-10 08:09:26 +01:00
GameFile: Avoid copying map pairs in GetLanguages()
We can just reference the pairs instead of taking them by value, avoiding copying std::string instances.
This commit is contained in:
parent
18c3e0302f
commit
d3ed750c9d
@ -308,7 +308,7 @@ std::vector<DiscIO::Language> GameFile::GetLanguages() const
|
|||||||
{
|
{
|
||||||
std::vector<DiscIO::Language> languages;
|
std::vector<DiscIO::Language> languages;
|
||||||
// TODO: What if some languages don't have long names but have other strings?
|
// 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);
|
languages.push_back(name.first);
|
||||||
return languages;
|
return languages;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user