aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_remove.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/commands_remove.cpp')
-rw-r--r--toolsrc/src/commands_remove.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/toolsrc/src/commands_remove.cpp b/toolsrc/src/commands_remove.cpp
index 2e6807575..cd8f81f92 100644
--- a/toolsrc/src/commands_remove.cpp
+++ b/toolsrc/src/commands_remove.cpp
@@ -145,17 +145,15 @@ namespace vcpkg::Commands::Remove
System::println("The following packages will be removed:\n%s",
Strings::join("\n", remove, [](const PackageSpecWithRemovePlan* p)
{
- if (p->plan.request_type == RequestType::AUTO_SELECTED)
+ switch (p->plan.request_type)
{
- return " * " + p->spec.to_string();
+ case RequestType::AUTO_SELECTED:
+ return " * " + p->spec.to_string();
+ case RequestType::USER_REQUESTED:
+ return " " + p->spec.to_string();
+ default:
+ Checks::unreachable(VCPKG_LINE_INFO);
}
-
- if (p->plan.request_type == RequestType::USER_REQUESTED)
- {
- return " " + p->spec.to_string();
- }
-
- Checks::unreachable(VCPKG_LINE_INFO);
}));
}
}