Improve listFiles for win32, use std::move avoid string deep copy

This commit is contained in:
halx99 2020-08-28 11:05:32 +08:00
parent e75a29a393
commit 2a234afc3d
1 changed files with 2 additions and 2 deletions

View File

@ -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)