Don't capture anything in lambdas, if they don't need it

This commit is contained in:
Alexander Karatarakis 2017-02-10 17:14:54 -08:00
parent 2b90350632
commit cc1692f304

View File

@ -102,7 +102,7 @@ namespace vcpkg::Files
void recursive_find_all_files_in_dir(const fs::path& dir, std::vector<fs::path>* output) void recursive_find_all_files_in_dir(const fs::path& dir, std::vector<fs::path>* output)
{ {
recursive_find_matching_paths_in_dir(dir, [&](const fs::path& current) recursive_find_matching_paths_in_dir(dir, [](const fs::path& current)
{ {
return !fs::is_directory(current); return !fs::is_directory(current);
}, output); }, output);
@ -117,7 +117,7 @@ namespace vcpkg::Files
void non_recursive_find_all_files_in_dir(const fs::path& dir, std::vector<fs::path>* output) void non_recursive_find_all_files_in_dir(const fs::path& dir, std::vector<fs::path>* output)
{ {
non_recursive_find_matching_paths_in_dir(dir, [&](const fs::path& current) non_recursive_find_matching_paths_in_dir(dir, [](const fs::path& current)
{ {
return !fs::is_directory(current); return !fs::is_directory(current);
}, output); }, output);