diff options
| -rw-r--r-- | toolsrc/src/vcpkg_Strings.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/toolsrc/src/vcpkg_Strings.cpp b/toolsrc/src/vcpkg_Strings.cpp index 403900dae..d2e153ede 100644 --- a/toolsrc/src/vcpkg_Strings.cpp +++ b/toolsrc/src/vcpkg_Strings.cpp @@ -109,9 +109,13 @@ namespace vcpkg {namespace Strings void trim_all_and_remove_whitespace_strings(std::vector<std::string>* strings) { - strings->erase(std::remove_if(strings->begin(), strings->end(), [](std::string& s)-> bool + for (std::string& s : *strings) + { + trim(&s); + } + + strings->erase(std::remove_if(strings->begin(), strings->end(), [](const std::string& s)-> bool { - trim(&s); return s == ""; }), strings->end()); } |
