reduce compile warning .

This commit is contained in:
Zero Fanker 2024-11-23 21:47:49 -05:00
parent c890d9a480
commit 120af09fc2

View file

@ -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<float>(xy.x);
auto const cy = static_cast<float>(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