Remove superfluous config object empty check

Empty objects obviously also don't contain the keys we're looking for.
This commit is contained in:
Daniel Schulte 2020-11-22 19:28:51 +01:00
parent 900cb9a3e1
commit baec1fdf2c
1 changed files with 12 additions and 14 deletions

View File

@ -433,7 +433,6 @@ int main()
fprintf(stderr, "Can't read config file %s...\n", config_file.c_str());
}
}
if(!config.empty()) {
if(config.contains("apiKey") && config["apiKey"].is_string()) {
yt_config.api_key = config["apiKey"];
} else {
@ -449,7 +448,6 @@ int main()
if(config.contains("database") && config["database"].is_string()) {
database_filename = config["database"];
}
}
SC(sqlite3_open(database_filename.c_str(), &db));
db_check_schema();