aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_install.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-18 15:31:10 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-21 18:06:52 -0700
commit6350eddd4689568ff8dcfe431e1bf81579fb0556 (patch)
treee8912dcfcb7e833cf9626afa808cdf2eab5af485 /toolsrc/src/commands_install.cpp
parent989083caacfe44e442a88db851ded8e2b519c143 (diff)
downloadvcpkg-6350eddd4689568ff8dcfe431e1bf81579fb0556.tar.gz
vcpkg-6350eddd4689568ff8dcfe431e1bf81579fb0556.zip
Find group_by_plan_type outside of print_plan()
Diffstat (limited to 'toolsrc/src/commands_install.cpp')
-rw-r--r--toolsrc/src/commands_install.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp
index cb9a8f61b..dc1a69167 100644
--- a/toolsrc/src/commands_install.cpp
+++ b/toolsrc/src/commands_install.cpp
@@ -169,13 +169,10 @@ namespace vcpkg::Commands::Install
return SortedVector<std::string>(std::move(installed_files));
}
- static void print_plan(const std::vector<InstallPlanAction>& plan)
+ static void print_plan(const std::map<InstallPlanType, std::vector<const InstallPlanAction*>>& group_by_plan_type)
{
static constexpr std::array<InstallPlanType, 3> order = { InstallPlanType::ALREADY_INSTALLED, InstallPlanType::BUILD_AND_INSTALL, InstallPlanType::INSTALL };
- std::map<InstallPlanType, std::vector<const InstallPlanAction*>> group_by_plan_type;
- Util::group_by(plan, &group_by_plan_type, [](const InstallPlanAction& p) { return p.plan_type; });
-
for (const InstallPlanType plan_type : order)
{
auto it = group_by_plan_type.find(plan_type);
@@ -286,7 +283,9 @@ namespace vcpkg::Commands::Install
const std::string specs_string = Strings::join(",", install_plan, [](const InstallPlanAction& plan) { return plan.spec.to_string(); });
Metrics::track_property("installplan", specs_string);
- print_plan(install_plan);
+ std::map<InstallPlanType, std::vector<const InstallPlanAction*>> group_by_plan_type;
+ Util::group_by(install_plan, &group_by_plan_type, [](const InstallPlanAction& p) { return p.plan_type; });
+ print_plan(group_by_plan_type);
const bool has_non_user_requested_packages = Util::find_if(install_plan, [](const InstallPlanAction& package)-> bool
{