1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Fix error on windows due to upkeep narrowing (#11711)

Running msbuild openrct2.proj /t:build /p:platform=x64 gave warning
C4309, which is to do with narrowing on a type conversion. This replaces
static_cast<money16>(0xFFFF) with MONEY16_UNDEFINED (which is
static_cast<money16>(static_cast<uint16_t>(0xFFFF)) ).
This commit is contained in:
stalefishies
2020-05-10 23:58:01 +01:00
committed by GitHub
parent e182791a6b
commit 8aaf8d0156

View File

@@ -691,7 +691,7 @@ static void window_ride_list_scrollpaint(rct_window* w, rct_drawpixelinfo* dpi,
break;
case INFORMATION_TYPE_RUNNING_COST:
formatSecondary = STR_RIDE_LIST_RUNNING_COST_UNKNOWN;
if (ride->upkeep_cost != static_cast<money16>(0xFFFF))
if (ride->upkeep_cost != MONEY16_UNDEFINED)
{
formatSecondary = STR_RIDE_LIST_RUNNING_COST_LABEL;
set_format_arg(2, int32_t, ride->upkeep_cost * 16);