aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/vcpkg_cmd_arguments.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'toolsrc/src/vcpkg_cmd_arguments.cpp')
-rw-r--r--toolsrc/src/vcpkg_cmd_arguments.cpp26
1 files changed, 12 insertions, 14 deletions
diff --git a/toolsrc/src/vcpkg_cmd_arguments.cpp b/toolsrc/src/vcpkg_cmd_arguments.cpp
index a3648668f..fdeb6e877 100644
--- a/toolsrc/src/vcpkg_cmd_arguments.cpp
+++ b/toolsrc/src/vcpkg_cmd_arguments.cpp
@@ -1,8 +1,6 @@
-#define WIN32_LEAN_AND_MEAN
-#include <Windows.h>
+#include "pch.h"
#include "vcpkg_cmd_arguments.h"
#include "vcpkg_Commands.h"
-#include <unordered_set>
#include "metrics.h"
#include "vcpkg_System.h"
@@ -18,7 +16,7 @@ namespace vcpkg
{
System::println(System::color::error, "Error: expected value after %s", option_name);
TrackProperty("error", "error option name");
- print_usage();
+ Commands::Help::print_usage();
exit(EXIT_FAILURE);
}
@@ -26,7 +24,7 @@ namespace vcpkg
{
System::println(System::color::error, "Error: %s specified multiple times", option_name);
TrackProperty("error", "error option specified multiple times");
- print_usage();
+ Commands::Help::print_usage();
exit(EXIT_FAILURE);
}
@@ -34,15 +32,15 @@ namespace vcpkg
}
static void parse_switch(
- opt_bool new_setting,
+ opt_bool_t new_setting,
const std::string& option_name,
- opt_bool& option_field)
+ opt_bool_t& option_field)
{
- if (option_field != opt_bool::unspecified && option_field != new_setting)
+ if (option_field != opt_bool_t::UNSPECIFIED && option_field != new_setting)
{
System::println(System::color::error, "Error: conflicting values specified for --%s", option_name);
TrackProperty("error", "error conflicting switches");
- print_usage();
+ Commands::Help::print_usage();
exit(EXIT_FAILURE);
}
option_field = new_setting;
@@ -96,27 +94,27 @@ namespace vcpkg
}
if (arg == "--debug")
{
- parse_switch(opt_bool::enabled, "debug", args.debug);
+ parse_switch(opt_bool_t::ENABLED, "debug", args.debug);
continue;
}
if (arg == "--sendmetrics")
{
- parse_switch(opt_bool::enabled, "sendmetrics", args.sendmetrics);
+ parse_switch(opt_bool_t::ENABLED, "sendmetrics", args.sendmetrics);
continue;
}
if (arg == "--printmetrics")
{
- parse_switch(opt_bool::enabled, "printmetrics", args.printmetrics);
+ parse_switch(opt_bool_t::ENABLED, "printmetrics", args.printmetrics);
continue;
}
if (arg == "--no-sendmetrics")
{
- parse_switch(opt_bool::disabled, "sendmetrics", args.sendmetrics);
+ parse_switch(opt_bool_t::DISABLED, "sendmetrics", args.sendmetrics);
continue;
}
if (arg == "--no-printmetrics")
{
- parse_switch(opt_bool::disabled, "printmetrics", args.printmetrics);
+ parse_switch(opt_bool_t::DISABLED, "printmetrics", args.printmetrics);
continue;
}