refactor: only refer to game id in zone

This commit is contained in:
Jan Laupetin
2025-08-31 18:00:27 +01:00
parent 495e85f945
commit 734173066b
56 changed files with 145 additions and 193 deletions
-18
View File
@@ -21,24 +21,6 @@ const std::string& Game::GetShortName() const
return shortName;
}
void Game::AddZone(Zone* zone)
{
m_zones.push_back(zone);
}
void Game::RemoveZone(Zone* zone)
{
const auto foundEntry = std::ranges::find(m_zones, zone);
if (foundEntry != m_zones.end())
m_zones.erase(foundEntry);
}
const std::vector<Zone*>& Game::GetZones() const
{
return m_zones;
}
const std::vector<GameLanguagePrefix>& Game::GetLanguagePrefixes() const
{
static std::vector<GameLanguagePrefix> prefixes;
-6
View File
@@ -9,12 +9,6 @@ namespace IW4
[[nodiscard]] GameId GetId() const override;
[[nodiscard]] const std::string& GetFullName() const override;
[[nodiscard]] const std::string& GetShortName() const override;
void AddZone(Zone* zone) override;
void RemoveZone(Zone* zone) override;
[[nodiscard]] const std::vector<Zone*>& GetZones() const override;
[[nodiscard]] const std::vector<GameLanguagePrefix>& GetLanguagePrefixes() const override;
private:
std::vector<Zone*> m_zones;
};
} // namespace IW4