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

@@ -178,7 +178,18 @@
if (station_id != ScriptStation::STATION_JOIN_ADJACENT) p1 |= (1 << 24);
const GRFFile *file;
uint16 res = GetAiPurchaseCallbackResult(GSF_STATIONS, cargo_id, 0, source_industry, goal_industry, min(255, distance / 2), AICE_STATION_GET_STATION_ID, source_station ? 0 : 1, min(15, num_platforms) << 4 | min(15, platform_length), &file);
uint16 res = GetAiPurchaseCallbackResult(
GSF_STATIONS,
cargo_id,
0,
source_industry,
goal_industry,
std::min(255, distance / 2),
AICE_STATION_GET_STATION_ID,
source_station ? 0 : 1,
std::min(15u, num_platforms) << 4 | std::min(15u, platform_length),
&file
);
uint32 p2 = (ScriptStation::IsValidStation(station_id) ? station_id : INVALID_STATION) << 16;
if (res != CALLBACK_FAILED) {
int index = 0;