1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Remove some redundant casts and fix rct_sprite::AsDuck()

This commit is contained in:
Michael Steenbeek
2018-02-15 13:04:25 +01:00
committed by GitHub
parent c8c9bf70a7
commit d481cca2ed
15 changed files with 33 additions and 35 deletions

View File

@@ -340,12 +340,12 @@ void RideObject::SetRepositoryItem(ObjectRepositoryItem * item) const
item->RideFlags = flags;
// Find the first non-null ride type, to be used when checking the ride group
uint8 rideTypeIdx = ride_entry_get_first_non_null_ride_type((rct_ride_entry *)&_legacyType);
uint8 rideTypeIdx = ride_entry_get_first_non_null_ride_type(&_legacyType);
// Determines the ride group. Will fall back to 0 if there is none found.
uint8 rideGroupIndex = 0;
const RideGroup * rideGroup = RideGroupManager::GetRideGroup(rideTypeIdx, (rct_ride_entry *)&_legacyType);
const RideGroup * rideGroup = RideGroupManager::GetRideGroup(rideTypeIdx, &_legacyType);
// If the ride group is nullptr, the track type does not have ride groups.
if (rideGroup != nullptr)