From 120af09fc2cb3978180e607e3a56268e300530e5 Mon Sep 17 00:00:00 2001 From: Zero Fanker Date: Sat, 23 Nov 2024 21:47:49 -0500 Subject: [PATCH] reduce compile warning . --- MissionEditor/MapData.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MissionEditor/MapData.h b/MissionEditor/MapData.h index c6af5e1..df49702 100644 --- a/MissionEditor/MapData.h +++ b/MissionEditor/MapData.h @@ -663,7 +663,8 @@ inline MapCoords CMapData::ToMapCoords(ProjectedCoords xy) const inline MapCoords CMapData::ToMapCoords3d(ProjectedCoords xy, int mapZ) const { - float cx = xy.x, cy = xy.y + mapZ * f_y / 2; + auto const cx = static_cast(xy.x); + auto const cy = static_cast(xy.y + mapZ * f_y / 2); return MapCoords( cy / (float)f_y - cx / (float)f_x + (float)(m_IsoSize - 2) / 2 + (float)0.5, cy / (float)f_y + cx / (float)f_x - (float)(m_IsoSize - 2) / 2.0f - (float)0.5