[opt_bool] Make members ALL_CAPS
MODIFY
include/opt_bool.h
include/opt_bool.h
@@ -4,8 +4,8 @@ namespace vcpkg
{
enum class opt_bool
{
- unspecified,
- enabled,
- disabled
+ UNSPECIFIED,
+ ENABLED,
+ DISABLED
};
}

MODIFY
include/vcpkg_cmd_arguments.h
include/vcpkg_cmd_arguments.h
@@ -14,9 +14,9 @@ namespace vcpkg
std::unique_ptr<std::string> vcpkg_root_dir;
std::unique_ptr<std::string> target_triplet;
- opt_bool debug = opt_bool::unspecified;
- opt_bool sendmetrics = opt_bool::unspecified;
- opt_bool printmetrics = opt_bool::unspecified;
+ opt_bool debug = opt_bool::UNSPECIFIED;
+ opt_bool sendmetrics = opt_bool::UNSPECIFIED;
+ opt_bool printmetrics = opt_bool::UNSPECIFIED;
std::string command;
std::vector<std::string> command_arguments;

MODIFY
src/vcpkg.cpp
src/vcpkg.cpp
@@ -202,14 +202,14 @@ int wmain(const int argc, const wchar_t* const* const argv)
const vcpkg_cmd_arguments args = vcpkg_cmd_arguments::create_from_command_line(argc, argv);
- if (args.printmetrics != opt_bool::unspecified)
- SetPrintMetrics(args.printmetrics == opt_bool::enabled);
- if (args.sendmetrics != opt_bool::unspecified)
- SetSendMetrics(args.sendmetrics == opt_bool::enabled);
+ if (args.printmetrics != opt_bool::UNSPECIFIED)
+ SetPrintMetrics(args.printmetrics == opt_bool::ENABLED);
+ if (args.sendmetrics != opt_bool::UNSPECIFIED)
+ SetSendMetrics(args.sendmetrics == opt_bool::ENABLED);
- if (args.debug != opt_bool::unspecified)
+ if (args.debug != opt_bool::UNSPECIFIED)
{
- g_debugging = (args.debug == opt_bool::enabled);
+ g_debugging = (args.debug == opt_bool::ENABLED);
}
if (g_debugging)

MODIFY
src/vcpkg_cmd_arguments.cpp
src/vcpkg_cmd_arguments.cpp
@@ -36,7 +36,7 @@ namespace vcpkg
const std::string& option_name,
opt_bool& option_field)
{
- if (option_field != opt_bool::unspecified && option_field != new_setting)
+ if (option_field != opt_bool::UNSPECIFIED && option_field != new_setting)
{
System::println(System::color::error, "Error: conflicting values specified for --%s", option_name);
TrackProperty("error", "error conflicting switches");
@@ -94,27 +94,27 @@ namespace vcpkg
}
if (arg == "--debug")
{
- parse_switch(opt_bool::enabled, "debug", args.debug);
+ parse_switch(opt_bool::ENABLED, "debug", args.debug);
continue;
}
if (arg == "--sendmetrics")
{
- parse_switch(opt_bool::enabled, "sendmetrics", args.sendmetrics);
+ parse_switch(opt_bool::ENABLED, "sendmetrics", args.sendmetrics);
continue;
}
if (arg == "--printmetrics")
{
- parse_switch(opt_bool::enabled, "printmetrics", args.printmetrics);
+ parse_switch(opt_bool::ENABLED, "printmetrics", args.printmetrics);
continue;
}
if (arg == "--no-sendmetrics")
{
- parse_switch(opt_bool::disabled, "sendmetrics", args.sendmetrics);
+ parse_switch(opt_bool::DISABLED, "sendmetrics", args.sendmetrics);
continue;
}
if (arg == "--no-printmetrics")
{
- parse_switch(opt_bool::disabled, "printmetrics", args.printmetrics);
+ parse_switch(opt_bool::DISABLED, "printmetrics", args.printmetrics);
continue;
}

[opt_bool] Make members ALL_CAPS