aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg_Dependencies.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-06 18:57:17 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-07 15:45:13 -0700
commit60b49cf4f7958ae934bebfa165815ea79e403359 (patch)
tree852952ab4ffdf518766c9603192a46ff786af4c4 /toolsrc/src/vcpkg_Dependencies.cpp
parent1ed61c4de820da8a33828b3a220742357d2c004d (diff)
downloadvcpkg-60b49cf4f7958ae934bebfa165815ea79e403359.tar.gz
vcpkg-60b49cf4f7958ae934bebfa165815ea79e403359.zip
Extract functions for output formatting
Diffstat (limited to 'toolsrc/src/vcpkg_Dependencies.cpp')
-rw-r--r--toolsrc/src/vcpkg_Dependencies.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/toolsrc/src/vcpkg_Dependencies.cpp b/toolsrc/src/vcpkg_Dependencies.cpp
index 7f21d04c2..b09ad9ff5 100644
--- a/toolsrc/src/vcpkg_Dependencies.cpp
+++ b/toolsrc/src/vcpkg_Dependencies.cpp
@@ -9,6 +9,19 @@
namespace vcpkg::Dependencies
{
+ std::string to_output_string(RequestType request_type, const CStringView s)
+ {
+ switch (request_type)
+ {
+ case RequestType::AUTO_SELECTED:
+ return Strings::format(" * %s", s);
+ case RequestType::USER_REQUESTED:
+ return Strings::format(" %s", s);
+ default:
+ Checks::unreachable(VCPKG_LINE_INFO);
+ }
+ }
+
InstallPlanAction::InstallPlanAction() : plan_type(InstallPlanType::UNKNOWN), binary_pgh(nullopt), source_pgh(nullopt)
{
}