Commit 4974afb49d75f046052e59a02ac3abdfa6f2729d

Authored by Henry Schreiner
Committed by Henry Schreiner
1 parent ae62b4e3

Fix a minor best practices issue

Showing 1 changed file with 2 additions and 2 deletions
include/CLI/Option.hpp
@@ -227,8 +227,8 @@ class Option : public OptionBase<Option> { @@ -227,8 +227,8 @@ class Option : public OptionBase<Option> {
227 227
228 /// Making an option by hand is not defined, it must be made by the App class 228 /// Making an option by hand is not defined, it must be made by the App class
229 Option( 229 Option(
230 - std::string name, std::string description, std::function<bool(results_t)> callback, bool default_, App *parent)  
231 - : description_(std::move(description)), default_(default_), parent_(parent), 230 + std::string name, std::string description, std::function<bool(results_t)> callback, bool defaulted, App *parent)
  231 + : description_(std::move(description)), default_(defaulted), parent_(parent),
232 callback_(callback ? std::move(callback) : [](results_t) { return true; }) { 232 callback_(callback ? std::move(callback) : [](results_t) { return true; }) {
233 std::tie(snames_, lnames_, pname_) = detail::get_names(detail::split_names(name)); 233 std::tie(snames_, lnames_, pname_) = detail::get_names(detail::split_names(name));
234 } 234 }