Codechange: switch our codebase to C++20

This commit is contained in:
Patric Stout
2024-01-16 20:38:42 +01:00
committed by Patric Stout
parent fd59393899
commit bb49112784
11 changed files with 18 additions and 18 deletions

View File

@@ -391,7 +391,7 @@ inline Foundation InclinedFoundation(Axis axis)
inline Foundation HalftileFoundation(Corner corner)
{
assert(IsValidCorner(corner));
return (Foundation)(FOUNDATION_HALFTILE_W + corner);
return static_cast<Foundation>(static_cast<uint>(FOUNDATION_HALFTILE_W) + static_cast<uint>(corner));
}
/**
@@ -403,7 +403,7 @@ inline Foundation HalftileFoundation(Corner corner)
inline Foundation SpecialRailFoundation(Corner corner)
{
assert(IsValidCorner(corner));
return (Foundation)(FOUNDATION_RAIL_W + corner);
return static_cast<Foundation>(static_cast<uint>(FOUNDATION_RAIL_W) + static_cast<uint>(corner));
}
/**