1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 02:05:13 +01:00

Reduce object casting (#24072)

This commit is contained in:
Michael Steenbeek
2025-03-25 08:51:44 +01:00
committed by GitHub
parent a8e2c6e375
commit 70bdddcf36
20 changed files with 36 additions and 66 deletions

View File

@@ -65,6 +65,5 @@ void TerrainEdgeObject::ReadJson(IReadObjectContext* context, json_t& root)
TerrainEdgeObject* TerrainEdgeObject::GetById(ObjectEntryIndex entryIndex)
{
auto& objMgr = OpenRCT2::GetContext()->GetObjectManager();
auto* obj = objMgr.GetLoadedObject(ObjectType::terrainEdge, entryIndex);
return static_cast<TerrainEdgeObject*>(obj);
return objMgr.GetLoadedObject<TerrainEdgeObject>(entryIndex);
}