Skip to content

Commit

Permalink
Rename capture_default + _str
Browse files Browse the repository at this point in the history
  • Loading branch information
henryiii committed Mar 3, 2019
1 parent 3625745 commit bcdbd16
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions include/CLI/App.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ class App {
opt->default_function([&variable]() { return std::string(CLI::detail::to_string(variable)); });

if(defaulted)
opt->capture_default();
opt->capture_default_str();

return opt;
}
Expand Down Expand Up @@ -488,7 +488,7 @@ class App {
});

if(defaulted)
opt->capture_default();
opt->capture_default_str();

return opt;
}
Expand Down
2 changes: 1 addition & 1 deletion include/CLI/Option.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ class Option : public OptionBase<Option> {
}

/// Capture the default value from the original value (if it can be captured)
Option *capture_default() {
Option *capture_default_str() {
if(default_function_) {
defaultval_ = default_function_();
default_ = true;
Expand Down
2 changes: 1 addition & 1 deletion tests/CreationTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ TEST(ValidatorTests, ValidatorDefaults) {
EXPECT_EQ(V2.get_description(), "check");
EXPECT_TRUE(V2.get_active());
EXPECT_TRUE(V2.get_modifying());
// This class only support streaming in, not out
// This class only support streaming in, not out
}

class Unstreamable {
Expand Down

0 comments on commit bcdbd16

Please sign in to comment.