Skip to content

Commit 52319aa

Browse files
committed
clang-format and apply a similar suggestion as @ras0219-msft 's to the install actions.
1 parent 29a0b19 commit 52319aa

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

src/vcpkg/dependencies.cpp

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,30 +1257,25 @@ namespace vcpkg
12571257

12581258
for (auto&& already_installed_action : action_plan.already_installed)
12591259
{
1260-
(already_installed_action.use_head_version == UseHeadVersion::Yes ? &already_installed_head_plans : &already_installed_plans)->push_back(&already_installed_action);
1260+
(already_installed_action.use_head_version == UseHeadVersion::Yes ? &already_installed_head_plans
1261+
: &already_installed_plans)
1262+
->push_back(&already_installed_action);
12611263
}
1264+
12621265
for (auto&& remove_action : action_plan.remove_actions)
12631266
{
12641267
remove_specs.emplace(remove_action.spec);
12651268
}
1269+
12661270
for (auto&& install_action : action_plan.install_actions)
12671271
{
12681272
// remove plans are guaranteed to come before install plans, so we know the plan will be contained
12691273
// if at all.
12701274
auto it = remove_specs.find(install_action.spec);
12711275
if (it == remove_specs.end())
12721276
{
1273-
std::vector<const InstallPlanAction*>* to_add;
1274-
if (install_action.plan_type == InstallPlanType::EXCLUDED)
1275-
{
1276-
to_add = &excluded;
1277-
}
1278-
else
1279-
{
1280-
to_add = &new_plans;
1281-
}
1282-
1283-
to_add->push_back(&install_action);
1277+
(install_action.plan_type == InstallPlanType::EXCLUDED ? &excluded : &new_plans)
1278+
->push_back(&install_action);
12841279
}
12851280
else
12861281
{

0 commit comments

Comments
 (0)