1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-03 05:53:52 +00:00

Fix a minor best practices issue

This commit is contained in:
Henry Schreiner 2018-06-27 18:38:36 +02:00 committed by Henry Schreiner
parent ae62b4e3a5
commit 4974afb49d

View File

@ -227,8 +227,8 @@ class Option : public OptionBase<Option> {
/// Making an option by hand is not defined, it must be made by the App class
Option(
std::string name, std::string description, std::function<bool(results_t)> callback, bool default_, App *parent)
: description_(std::move(description)), default_(default_), parent_(parent),
std::string name, std::string description, std::function<bool(results_t)> callback, bool defaulted, App *parent)
: description_(std::move(description)), default_(defaulted), parent_(parent),
callback_(callback ? std::move(callback) : [](results_t) { return true; }) {
std::tie(snames_, lnames_, pname_) = detail::get_names(detail::split_names(name));
}