aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkglib.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-12 22:39:14 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-12 22:40:24 -0700
commit3739e8e0b998b14c0f320c21618057e50698c51d (patch)
treef1ac247ff23150db86ee94c1dbcaace9d5fc0dce /toolsrc/src/vcpkglib.cpp
parentb578320d9c3f282ecc8d0ee0d8564a321a31796d (diff)
downloadvcpkg-3739e8e0b998b14c0f320c21618057e50698c51d.tar.gz
vcpkg-3739e8e0b998b14c0f320c21618057e50698c51d.zip
Use Util::keep_if()
Diffstat (limited to 'toolsrc/src/vcpkglib.cpp')
-rw-r--r--toolsrc/src/vcpkglib.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/toolsrc/src/vcpkglib.cpp b/toolsrc/src/vcpkglib.cpp
index 5e847019f..fb1f39256 100644
--- a/toolsrc/src/vcpkglib.cpp
+++ b/toolsrc/src/vcpkglib.cpp
@@ -4,6 +4,7 @@
#include "Paragraphs.h"
#include "metrics.h"
#include "vcpkg_Strings.h"
+#include "vcpkg_Util.h"
namespace vcpkg
{
@@ -201,12 +202,10 @@ namespace vcpkg
upgrade_to_slash_terminated_sorted_format(&installed_files_of_current_pgh, listfile_path);
// Remove the directories
- installed_files_of_current_pgh.erase(
- std::remove_if(installed_files_of_current_pgh.begin(), installed_files_of_current_pgh.end(), [](const std::string& file) -> bool
- {
- return file.back() == '/';
- }
- ), installed_files_of_current_pgh.end());
+ Util::keep_if(installed_files_of_current_pgh, [](const std::string& file) -> bool
+ {
+ return file.back() != '/';
+ });
StatusParagraphAndAssociatedFiles pgh_and_files = { *pgh, SortedVector<std::string>(std::move(installed_files_of_current_pgh)) };
installed_files.push_back(std::move(pgh_and_files));