1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Resolve GCC warnings for Ride.cpp (#12553)

Eliminate warnings from ride_create_vehicles and ride_create_vehicles_find_first_block that would prevent build from succeeding when using GCC.
This commit is contained in:
Cory Sanin
2020-08-01 17:28:47 -05:00
committed by GitHub
parent ddd21fa87a
commit 394e8fb733

View File

@@ -4629,7 +4629,8 @@ static void vehicle_unset_update_flag_b1(Vehicle* head)
static void ride_create_vehicles_find_first_block(Ride* ride, CoordsXYE* outXYElement)
{
Vehicle* vehicle = GetEntity<Vehicle>(ride->vehicles[0]);
assert(vehicle != nullptr);
if (vehicle == nullptr)
return;
auto curTrackPos = vehicle->TrackLocation;
auto curTrackElement = map_get_track_element_at(curTrackPos);
@@ -4744,7 +4745,7 @@ static bool ride_create_vehicles(Ride* ride, const CoordsXYE& element, int32_t i
{
if (ride->IsBlockSectioned())
{
CoordsXYE firstBlock;
CoordsXYE firstBlock{};
ride_create_vehicles_find_first_block(ride, &firstBlock);
loc_6DDF9C(ride, firstBlock.element);
}