summaryrefslogtreecommitdiff
path: root/Source/Core/UICommon/GameFile.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-06-19 12:25:13 -0400
committerLioncash <mathew1800@gmail.com>2018-06-19 12:25:16 -0400
commitd3ed750c9d72fe73ebcd40686500584fce3a238c (patch)
tree754cc66945959fa25b98392da7953ad9a564710c /Source/Core/UICommon/GameFile.cpp
parent18c3e0302f6bca8546516173f4cb3ab0aa896a90 (diff)
GameFile: Avoid copying map pairs in GetLanguages()
We can just reference the pairs instead of taking them by value, avoiding copying std::string instances.
Diffstat (limited to 'Source/Core/UICommon/GameFile.cpp')
-rw-r--r--Source/Core/UICommon/GameFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/UICommon/GameFile.cpp b/Source/Core/UICommon/GameFile.cpp
index 0d3f7469be..443f3bc931 100644
--- a/Source/Core/UICommon/GameFile.cpp
+++ b/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)
languages.push_back(name.first);
return languages;
}