Codechange: Remove min/max functions in favour of STL variants (#8502)

This commit is contained in:
Charles Pigott
2021-01-08 10:16:18 +00:00
committed by GitHub
parent c1fddb9a6a
commit 9b800a96ed
181 changed files with 900 additions and 954 deletions

View File

@@ -471,7 +471,7 @@ public:
/* Check for speed limit imposed by railtype */
if (IsRailTT()) {
uint16 rail_speed = GetRailTypeInfo(GetRailType(m_old_tile))->max_speed;
if (rail_speed > 0) max_speed = min(max_speed, rail_speed);
if (rail_speed > 0) max_speed = std::min<int>(max_speed, rail_speed);
}
/* if min speed was requested, return it */