fix warning in TeamIndex constructor

This commit is contained in:
Martin Michelsen
2023-12-13 15:36:55 -08:00
parent 0429638cf0
commit 7cb0ef9f3e
+1 -2
View File
@@ -237,8 +237,7 @@ TeamIndex::TeamIndex(const string& directory, const JSON& reward_defs_json)
if (filename == "base.json") {
auto json = JSON::parse(load_file(file_path));
this->next_team_id = json.get_int("NextTeamID");
}
if (ends_with(filename, ".json")) {
} else if (ends_with(filename, ".json")) {
try {
uint32_t team_id = stoul(filename.substr(0, filename.size() - 5), nullptr, 16);
auto team = make_shared<Team>(team_id);