forked from rosebudai/OpenRCT2-Web
Use range-based for loops in libopenrct2
This commit is contained in:
1 parent
3c2aaefc85
commit
628039dd8a
23 files changed
+194
-209
No files matched your search
@@ -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++;
|
||||
|
||||
Reference in new issue
Block a user