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
0fd2364429
commit
9ae19df7e0
|
@ -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