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

Fix error with if(string)

This commit is contained in:
Henry Fredrick Schreiner 2017-11-28 16:09:15 -05:00 committed by Henry Schreiner
parent 261799b398
commit 45520a0ec4
2 changed files with 3 additions and 2 deletions

View File

@ -589,7 +589,7 @@ class App {
remove_option(config_ptr_);
// Only add config if option passed
if(name) {
if(!name.empty()) {
config_name_ = default_filename;
config_required_ = required;
config_ptr_ = add_option(name, config_name_, help, !default_filename.empty());

View File

@ -429,7 +429,8 @@ TEST_F(TApp, IniSubFailure) {
EXPECT_THROW(run(), CLI::INIError);
}
d TEST_F(TApp, IniNoSubFailure) {
TEST_F(TApp, IniNoSubFailure) {
TempFile tmpini{"TestIniTmp.ini"};