diff --git a/src/slope_func.h b/src/slope_func.h --- a/src/slope_func.h +++ b/src/slope_func.h @@ -391,7 +391,7 @@ inline Foundation InclinedFoundation(Axi inline Foundation HalftileFoundation(Corner corner) { assert(IsValidCorner(corner)); - return (Foundation)(FOUNDATION_HALFTILE_W + corner); + return static_cast(static_cast(FOUNDATION_HALFTILE_W) + static_cast(corner)); } /** @@ -403,7 +403,7 @@ inline Foundation HalftileFoundation(Cor inline Foundation SpecialRailFoundation(Corner corner) { assert(IsValidCorner(corner)); - return (Foundation)(FOUNDATION_RAIL_W + corner); + return static_cast(static_cast(FOUNDATION_RAIL_W) + static_cast(corner)); } /**