diff options
| author | Alexander Karatarakis <alkarata@microsoft.com> | 2017-04-13 15:49:33 -0700 |
|---|---|---|
| committer | Alexander Karatarakis <alkarata@microsoft.com> | 2017-04-13 15:49:33 -0700 |
| commit | 46999d38beb6f34f2c484f51e5421a8cabc23a07 (patch) | |
| tree | d658fa564b0c9139130e4b0b9ce1ad8a4a03af43 /toolsrc/src/commands_build.cpp | |
| parent | 294159bfd1a25fbffac8051bdf76f2cb88add0fd (diff) | |
| download | vcpkg-46999d38beb6f34f2c484f51e5421a8cabc23a07.tar.gz vcpkg-46999d38beb6f34f2c484f51e5421a8cabc23a07.zip | |
Use Util::erase_remove_if()
Diffstat (limited to 'toolsrc/src/commands_build.cpp')
| -rw-r--r-- | toolsrc/src/commands_build.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/toolsrc/src/commands_build.cpp b/toolsrc/src/commands_build.cpp index c3ebd7de8..710e108b0 100644 --- a/toolsrc/src/commands_build.cpp +++ b/toolsrc/src/commands_build.cpp @@ -10,6 +10,7 @@ #include "metrics.h" #include "vcpkg_Enums.h" #include "Paragraphs.h" +#include "vcpkg_Util.h" namespace vcpkg::Commands::Build { @@ -149,12 +150,10 @@ 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); - 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()); + Util::erase_remove_if(unmet_dependencies, [&spec](const InstallPlanAction& p) + { + return (p.spec == spec) || (p.plan_type == InstallPlanType::ALREADY_INSTALLED); + }); Checks::check_exit(VCPKG_LINE_INFO, !unmet_dependencies.empty()); System::println(System::Color::error, "The build command requires all dependencies to be already installed."); |
