fixed return value when invoking software with help flag

This commit is contained in:
Phuntsok Drak-pa 2019-04-13 14:48:21 +02:00
parent 85cfe3c975
commit bc94bb76c6
2 changed files with 1 additions and 2 deletions

View File

@ -19,5 +19,4 @@ int main(int ac, char** av)
ImageManipulator image_process{input_file, output_file, iterations};
image_process.exec_method(method, controlled_size);
image_process.write_file();
return 0;
}

View File

@ -43,7 +43,7 @@ void processFilenames(po::variables_map const& vm,
po::notify(vm);
if (vm.count("help") || !vm.count("input")) {
std::cout << desc << "\n";
std::exit(1);
std::exit(!vm.count("help"));
}
auto const input_path = vm["input"].as<path>();