1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Use TryGetEntity for iterators as it handles null entities explicitly

This commit is contained in:
ζeh Matt
2025-03-20 18:27:44 +02:00
parent e22c2eeb62
commit bd4db4a91b

View File

@@ -45,7 +45,7 @@ public:
while (iter != end && Entity == nullptr)
{
Entity = GetEntity<T>(*iter++);
Entity = TryGetEntity<T>(*iter++);
}
return *this;
}
@@ -119,7 +119,7 @@ public:
while (iter != end && Entity == nullptr)
{
Entity = GetEntity<T>(*iter++);
Entity = TryGetEntity<T>(*iter++);
}
return *this;
}