diff options
author | Andrzej Rybczak <electricityispower@gmail.com> | 2015-09-12 21:06:01 +0200 |
---|---|---|
committer | Andrzej Rybczak <electricityispower@gmail.com> | 2015-09-12 21:06:01 +0200 |
commit | a94e620f29d20febbcf655ed1b5f4cd9ecfb761e (patch) | |
tree | af6780a7c8397a7ae27c845452bb5ca0b5be09ac /src | |
parent | 71fa345280a4fd231ef441e55b3886aa667839ed (diff) |
configuration: make ignore-config-errors take no arguments
Diffstat (limited to 'src')
-rw-r--r-- | src/configuration.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/configuration.cpp b/src/configuration.cpp index f7b0ca66..84f0df88 100644 --- a/src/configuration.cpp +++ b/src/configuration.cpp @@ -78,7 +78,7 @@ bool configure(int argc, char **argv) ("host,h", po::value<std::string>()->default_value("localhost"), "connect to server at host") ("port,p", po::value<int>()->default_value(6600), "connect to server at port") ("config,c", po::value<std::vector<std::string>>(&config_paths)->default_value(default_config_paths, join<std::string>(default_config_paths, " AND ")), "specify configuration file(s)") - ("ignore-config-errors", po::value<bool>()->default_value(false), "ignore unknown and invalid options in configuration files") + ("ignore-config-errors", "ignore unknown and invalid options in configuration files") ("bindings,b", po::value<std::string>(&bindings_path)->default_value("~/.ncmpcpp/bindings"), "specify bindings file") ("screen,s", po::value<std::string>(), "specify initial screen") ("slave-screen,S", po::value<std::string>(), "specify initial slave screen") @@ -151,7 +151,7 @@ bool configure(int argc, char **argv) // read configuration std::for_each(config_paths.begin(), config_paths.end(), expand_home); - if (Config.read(config_paths, vm["ignore-config-errors"].as<bool>()) == false) + if (Config.read(config_paths, vm.count("ignore-config-errors")) == false) exit(1); // if bindings file was not specified, use the one from main directory. |