mirror of https://github.com/axmolengine/axmol.git
Improve listFiles for win32, use std::move avoid string deep copy
This commit is contained in:
parent
e75a29a393
commit
2a234afc3d
|
@ -228,7 +228,7 @@ void FileUtilsWin32::listFilesRecursively(const std::string& dirPath, std::vecto
|
|||
}
|
||||
else
|
||||
{
|
||||
files->push_back(filepath);
|
||||
files->push_back(std::move(filepath));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -283,7 +283,7 @@ std::vector<std::string> FileUtilsWin32::listFiles(const std::string& dirPath) c
|
|||
{
|
||||
filepath.push_back('/');
|
||||
}
|
||||
files.push_back(filepath);
|
||||
files.push_back(std::move(filepath));
|
||||
}
|
||||
|
||||
if (tinydir_next(&dir) == -1)
|
||||
|
|
Loading…
Reference in New Issue