mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-30 18:25:16 +01:00
Reduce casting for objects
This commit is contained in:
committed by
GitHub
parent
5934dc6380
commit
8063c5caa7
@@ -1862,7 +1862,7 @@ static bool FootpathIsLegacyPathEntryOkay(ObjectEntryIndex index)
|
||||
{
|
||||
bool showEditorPaths = ((gScreenFlags & SCREEN_FLAGS_SCENARIO_EDITOR) || GetGameState().Cheats.SandboxMode);
|
||||
auto& objManager = OpenRCT2::GetContext()->GetObjectManager();
|
||||
auto footpathObj = static_cast<FootpathObject*>(objManager.GetLoadedObject(ObjectType::Paths, index));
|
||||
auto footpathObj = objManager.GetLoadedObject<FootpathObject>(index);
|
||||
if (footpathObj != nullptr)
|
||||
{
|
||||
auto pathEntry = reinterpret_cast<FootpathEntry*>(footpathObj->GetLegacyData());
|
||||
|
||||
Reference in New Issue
Block a user