From 7cb0ef9f3e9a4b4ab943e626169a46a14fad7258 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Wed, 13 Dec 2023 15:36:55 -0800 Subject: [PATCH] fix warning in TeamIndex constructor --- src/TeamIndex.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/TeamIndex.cc b/src/TeamIndex.cc index 0baf8f47..158a462f 100644 --- a/src/TeamIndex.cc +++ b/src/TeamIndex.cc @@ -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_id);