Explicity set default values for program options based on initialized values from constructor

This commit is contained in:
Sean Hawkes
2021-09-20 08:34:28 -05:00
committed by hawkess
parent f2e59923ab
commit a875d1225a
2 changed files with 15 additions and 15 deletions
+3 -3
View File
@@ -70,9 +70,9 @@ void IsolTestOptions::addOptions()
CommonOptions::addOptions();
options.add_options()
("editor", po::value<std::string>(editor)->default_value(editorPath()), "Path to editor for opening test files.")
("help", po::bool_switch(&showHelp), "Show this help screen.")
("no-color", po::bool_switch(&noColor), "Don't use colors.")
("accept-updates", po::bool_switch(&acceptUpdates), "Automatically accept expectation updates.")
("help", po::bool_switch(&showHelp)->default_value(showHelp), "Show this help screen.")
("no-color", po::bool_switch(&noColor)->default_value(noColor), "Don't use colors.")
("accept-updates", po::bool_switch(&acceptUpdates)->default_value(acceptUpdates), "Automatically accept expectation updates.")
("test,t", po::value<std::string>(&testFilter)->default_value("*/*"), "Filters which test units to include.");
}