Don't copy each name in a loop

This commit is contained in:
KentuckyCompass
2015-09-07 16:36:40 -07:00
parent 8fb9403735
commit 32bea0c0e3
+1 -1
View File
@@ -325,7 +325,7 @@ ISOFileSystem::TreeEntry *ISOFileSystem::GetFromPath(std::string path, bool catc
std::string firstPathComponent = path.substr(0, path.find_first_of('/'));
for (size_t i = 0; i < e->children.size(); i++)
{
std::string n = e->children[i]->name;
const std::string &n = e->children[i]->name;
if (firstPathComponent == n)
{