Fix narrowing cast error in Load_VESR() in MSVC

This commit is contained in:
Jonathan G Rennison
2019-12-18 20:35:06 +00:00
parent a0e92e50f6
commit 0704fb81a3

View File

@@ -1109,7 +1109,7 @@ void Load_VESR()
{ {
int index; int index;
while ((index = SlIterateArray()) != -1) { while ((index = SlIterateArray()) != -1) {
auto iter = pending_speed_restriction_change_map.insert({ index, {} }); auto iter = pending_speed_restriction_change_map.insert({ static_cast<VehicleID>(index), {} });
PendingSpeedRestrictionChange *ptr = &(iter->second); PendingSpeedRestrictionChange *ptr = &(iter->second);
SlObject(ptr, GetVehicleSpeedRestrictionDescription()); SlObject(ptr, GetVehicleSpeedRestrictionDescription());
} }