1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Remove ObjectType++ operator, ensure ObjectTypes size

This commit is contained in:
Hielke Morsink
2022-06-30 23:13:40 +02:00
committed by GitHub
parent 43562a6899
commit 8e509d9669
4 changed files with 9 additions and 14 deletions

View File

@@ -140,7 +140,7 @@ public:
ObjectList GetLoadedObjects() override
{
ObjectList objectList;
for (auto objectType = ObjectType::Ride; objectType < ObjectType::Count; objectType++)
for (auto objectType : ObjectTypes)
{
auto maxObjectsOfType = static_cast<ObjectEntryIndex>(object_entry_group_counts[EnumValue(objectType)]);
for (ObjectEntryIndex i = 0; i < maxObjectsOfType; i++)
@@ -512,7 +512,7 @@ private:
std::vector<ObjectToLoad> requiredObjects;
std::vector<ObjectEntryDescriptor> missingObjects;
for (auto objectType = ObjectType::Ride; objectType < ObjectType::Count; objectType++)
for (auto objectType : ObjectTypes)
{
auto& descriptors = objectList.GetList(objectType);
auto maxSize = static_cast<size_t>(object_entry_group_counts[EnumValue(objectType)]);