diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2017-04-28 17:27:07 -0700 |
|---|---|---|
| committer | Robert Schumacher <roschuma@microsoft.com> | 2017-04-30 03:36:55 -0700 |
| commit | cbc52bc6a4f92ac4c5379912b09adb37a6ea1918 (patch) | |
| tree | ebd28c77d4268f6ac8fc1c0906ce2e279e530e63 /toolsrc/src/VcpkgCmdArguments.cpp | |
| parent | 5419aebcfed8cf044f723e07dd785b839fd6bb5b (diff) | |
| download | vcpkg-cbc52bc6a4f92ac4c5379912b09adb37a6ea1918.tar.gz vcpkg-cbc52bc6a4f92ac4c5379912b09adb37a6ea1918.zip | |
[vcpkg] Remove OptBool in favor of Optional<bool>
Diffstat (limited to 'toolsrc/src/VcpkgCmdArguments.cpp')
| -rw-r--r-- | toolsrc/src/VcpkgCmdArguments.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/toolsrc/src/VcpkgCmdArguments.cpp b/toolsrc/src/VcpkgCmdArguments.cpp index d12f4f78c..25f4c5582 100644 --- a/toolsrc/src/VcpkgCmdArguments.cpp +++ b/toolsrc/src/VcpkgCmdArguments.cpp @@ -31,9 +31,9 @@ namespace vcpkg option_field = std::make_unique<std::string>(*arg_begin); } - static void parse_switch(OptBool new_setting, const std::string& option_name, OptBool& option_field) + static void parse_switch(bool new_setting, const std::string& option_name, Optional<bool>& option_field) { - if (option_field != OptBoolC::UNSPECIFIED && option_field != new_setting) + if (option_field && option_field != new_setting) { System::println(System::Color::error, "Error: conflicting values specified for --%s", option_name); Metrics::track_property("error", "error conflicting switches"); @@ -94,27 +94,27 @@ namespace vcpkg } if (arg == "--debug") { - parse_switch(OptBoolC::ENABLED, "debug", args.debug); + parse_switch(true, "debug", args.debug); continue; } if (arg == "--sendmetrics") { - parse_switch(OptBoolC::ENABLED, "sendmetrics", args.sendmetrics); + parse_switch(true, "sendmetrics", args.sendmetrics); continue; } if (arg == "--printmetrics") { - parse_switch(OptBoolC::ENABLED, "printmetrics", args.printmetrics); + parse_switch(true, "printmetrics", args.printmetrics); continue; } if (arg == "--no-sendmetrics") { - parse_switch(OptBoolC::DISABLED, "sendmetrics", args.sendmetrics); + parse_switch(false, "sendmetrics", args.sendmetrics); continue; } if (arg == "--no-printmetrics") { - parse_switch(OptBoolC::DISABLED, "printmetrics", args.printmetrics); + parse_switch(false, "printmetrics", args.printmetrics); continue; } |
