1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 09:14:58 +01:00

Use range-based for loops in libopenrct2

This commit is contained in:
Hielke Morsink
2017-12-20 02:50:18 +01:00
committed by Michael Steenbeek
parent 3c2aaefc85
commit 628039dd8a
23 changed files with 194 additions and 209 deletions

View File

@@ -148,8 +148,8 @@ sint32 find_object_in_entry_group(const rct_object_entry* entry, uint8* entry_ty
void get_type_entry_index(size_t index, uint8 * outObjectType, uint8 * outEntryIndex)
{
uint8 objectType = OBJECT_TYPE_RIDE;
for (size_t i = 0; i < OBJECT_TYPE_COUNT; i++) {
size_t groupCount = object_entry_group_counts[i];
for (auto groupCount : object_entry_group_counts)
{
if (index >= groupCount) {
index -= groupCount;
objectType++;