File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -418,7 +418,7 @@ class Option : public OptionBase<Option> {
418418 }
419419
420420 // / Adds a Validator. Takes a const string& and returns an error message (empty if conversion/check is okay).
421- Option *check (const std::function<std::string(const std::string &)> & Validator,
421+ Option *check (std::function<std::string(const std::string &)> Validator,
422422 std::string Validator_description = "",
423423 std::string Validator_name = "") {
424424 validators_.emplace_back (Validator, std::move (Validator_description), std::move (Validator_name));
@@ -663,10 +663,10 @@ class Option : public OptionBase<Option> {
663663 callback_t get_callback () const { return callback_; }
664664
665665 // / Get the long names
666- std::vector<std::string> get_lnames () const { return lnames_; }
666+ const std::vector<std::string> & get_lnames () const { return lnames_; }
667667
668668 // / Get the short names
669- std::vector<std::string> get_snames () const { return snames_; }
669+ const std::vector<std::string> & get_snames () const { return snames_; }
670670
671671 // / Get the flag names with specified default values
672672 std::vector<std::string> get_fnames () const { return fnames_; }
You can’t perform that action at this time.
0 commit comments