diff --git a/src/tgp.cpp b/src/tgp.cpp --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -820,7 +820,7 @@ static void HeightMapSmoothCoastInDirect * Soften the coast slope */ for (depth = 0; IsValidXY(x, y) && depth <= max_coast_Smooth_depth; depth++, x += dir_x, y += dir_y) { h = _height_map.height(x, y); - h = std::min(h, h_prev + (4 + depth)); // coast softening formula + h = static_cast(std::min(h, h_prev + (4 + depth))); // coast softening formula _height_map.height(x, y) = h; h_prev = h; }