1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 01:04:50 +01:00

Use named casts instead of old-style casts

Change prepared with clang-tidy and google-readability-casting check
This commit is contained in:
Michał Janiszewski
2020-04-22 17:09:29 +02:00
committed by GitHub
parent cfd94d4fa5
commit 2323cc1596
114 changed files with 604 additions and 560 deletions

View File

@@ -1088,7 +1088,7 @@ int32_t check_for_sprite_list_cycles(bool fix)
// Now re-add remainder of the cycle back to list, safely.
// Add each sprite to the list until we encounter one that is already part of the list.
while (!index_is_in_list(cycle_next, (SPRITE_LIST)i))
while (!index_is_in_list(cycle_next, static_cast<SPRITE_LIST>(i)))
{
rct_sprite* spr = get_sprite(cycle_next);
@@ -1166,7 +1166,7 @@ int32_t check_for_spatial_index_cycles(bool fix)
// Now re-add remainder of the cycle back to list, safely.
// Add each sprite to the list until we encounter one that is already part of the list.
while (!index_is_in_list(cycle_next, (SPRITE_LIST)i))
while (!index_is_in_list(cycle_next, static_cast<SPRITE_LIST>(i)))
{
rct_sprite* spr = get_sprite(cycle_next);