Fix: conversion to smaller type warnings

This commit is contained in:
Rubidium
2023-05-03 06:05:07 +02:00
committed by rubidium42
parent 97b77f0251
commit 4a5a9f57c4
6 changed files with 21 additions and 16 deletions

View File

@@ -820,7 +820,7 @@ static void HeightMapSmoothCoastInDirection(int org_x, int org_y, int dir_x, int
* 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<uint>(h, h_prev + (4 + depth)); // coast softening formula
h = static_cast<Height>(std::min<uint>(h, h_prev + (4 + depth))); // coast softening formula
_height_map.height(x, y) = h;
h_prev = h;
}