aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_build.cpp
diff options
context:
space:
mode:
authorRobert Schumacher <ras0219@outlook.com>2017-04-13 02:15:42 -0700
committerRobert Schumacher <ras0219@outlook.com>2017-04-13 02:15:42 -0700
commitc92623216d0cda5e665439cc778667fd521eefeb (patch)
treefd537ce9b1c413ad0627014056ae117fc483c6bb /toolsrc/src/commands_build.cpp
parent3739e8e0b998b14c0f320c21618057e50698c51d (diff)
downloadvcpkg-c92623216d0cda5e665439cc778667fd521eefeb.tar.gz
vcpkg-c92623216d0cda5e665439cc778667fd521eefeb.zip
Revert "Use Util::keep_if()"
This reverts commit 3739e8e0b998b14c0f320c21618057e50698c51d.
Diffstat (limited to 'toolsrc/src/commands_build.cpp')
-rw-r--r--toolsrc/src/commands_build.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp
index c7db764de..c3ebd7de8 100644
--- a/toolsrc/src/commands_build.cpp
+++ b/toolsrc/src/commands_build.cpp
@@ -10,7 +10,6 @@
#include "metrics.h"
#include "vcpkg_Enums.h"
#include "Paragraphs.h"
-#include "vcpkg_Util.h"
namespace vcpkg::Commands::Build
{
@@ -150,10 +149,12 @@ namespace vcpkg::Commands::Build
if (result == BuildResult::CASCADED_DUE_TO_MISSING_DEPENDENCIES)
{
std::vector<InstallPlanAction> unmet_dependencies = Dependencies::create_install_plan(paths, { spec }, status_db);
- Util::keep_if(unmet_dependencies, [&spec](const InstallPlanAction& p)
- {
- return (p.spec != spec) && (p.plan_type != InstallPlanType::ALREADY_INSTALLED);
- });
+ unmet_dependencies.erase(
+ std::remove_if(unmet_dependencies.begin(), unmet_dependencies.end(), [&spec](const InstallPlanAction& p)
+ {
+ return (p.spec == spec) || (p.plan_type == InstallPlanType::ALREADY_INSTALLED);
+ }),
+ unmet_dependencies.end());
Checks::check_exit(VCPKG_LINE_INFO, !unmet_dependencies.empty());
System::println(System::Color::error, "The build command requires all dependencies to be already installed.");