mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-01 05:03:52 +00:00
Fix error with if(string)
This commit is contained in:
parent
261799b398
commit
45520a0ec4
@ -589,7 +589,7 @@ class App {
|
|||||||
remove_option(config_ptr_);
|
remove_option(config_ptr_);
|
||||||
|
|
||||||
// Only add config if option passed
|
// Only add config if option passed
|
||||||
if(name) {
|
if(!name.empty()) {
|
||||||
config_name_ = default_filename;
|
config_name_ = default_filename;
|
||||||
config_required_ = required;
|
config_required_ = required;
|
||||||
config_ptr_ = add_option(name, config_name_, help, !default_filename.empty());
|
config_ptr_ = add_option(name, config_name_, help, !default_filename.empty());
|
||||||
|
@ -429,7 +429,8 @@ TEST_F(TApp, IniSubFailure) {
|
|||||||
|
|
||||||
EXPECT_THROW(run(), CLI::INIError);
|
EXPECT_THROW(run(), CLI::INIError);
|
||||||
}
|
}
|
||||||
d TEST_F(TApp, IniNoSubFailure) {
|
|
||||||
|
TEST_F(TApp, IniNoSubFailure) {
|
||||||
|
|
||||||
TempFile tmpini{"TestIniTmp.ini"};
|
TempFile tmpini{"TestIniTmp.ini"};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user