1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 23:34:37 +01:00

Apply review requests

This commit is contained in:
Gymnasiast
2021-03-31 19:15:33 +02:00
parent b3bbdcbfd5
commit b627dbd3a4
4 changed files with 5 additions and 15 deletions

View File

@@ -63,12 +63,7 @@ void TerrainEdgeObject::ReadJson(IReadObjectContext* context, json_t& root)
TerrainEdgeObject* TerrainEdgeObject::GetById(ObjectEntryIndex entryIndex)
{
TerrainEdgeObject* result = nullptr;
auto& objMgr = OpenRCT2::GetContext()->GetObjectManager();
auto obj = objMgr.GetLoadedObject(ObjectType::TerrainSurface, entryIndex);
if (obj != nullptr)
{
result = static_cast<TerrainEdgeObject*>(obj);
}
return result;
return obj != nullptr ? static_cast<TerrainEdgeObject*>(obj) : nullptr;
}