diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2021-01-08 10:16:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 11:16:18 +0100 |
commit | 9b800a96ed32720ff60b74e498a0e0a6351004f9 (patch) | |
tree | 3f287d339e15c4902ee415556475fd9b2918d33c /src/saveload/oldloader_sl.cpp | |
parent | c1fddb9a6ae5c3af6865461a7295788a341011a2 (diff) | |
download | openttd-9b800a96ed32720ff60b74e498a0e0a6351004f9.tar.xz |
Codechange: Remove min/max functions in favour of STL variants (#8502)
Diffstat (limited to 'src/saveload/oldloader_sl.cpp')
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index ff4e6191e..d9926aa60 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -392,7 +392,7 @@ static bool FixTTOEngines() for (uint i = 0; i < lengthof(_orig_ship_vehicle_info); i++, j++) new (GetTempDataEngine(j)) Engine(VEH_SHIP, i); for (uint i = 0; i < lengthof(_orig_aircraft_vehicle_info); i++, j++) new (GetTempDataEngine(j)) Engine(VEH_AIRCRAFT, i); - Date aging_date = min(_date + DAYS_TILL_ORIGINAL_BASE_YEAR, ConvertYMDToDate(2050, 0, 1)); + Date aging_date = std::min(_date + DAYS_TILL_ORIGINAL_BASE_YEAR, ConvertYMDToDate(2050, 0, 1)); for (EngineID i = 0; i < 256; i++) { int oi = ttd_to_tto[i]; @@ -1823,7 +1823,7 @@ bool LoadTTOMain(LoadgameState *ls) * "increase them to compensate for the faster time advance in TTD compared to TTO * which otherwise would cause much less income while the annual running costs of * the vehicles stay the same" */ - _economy.inflation_payment = min(_economy.inflation_payment * 124 / 74, MAX_INFLATION); + _economy.inflation_payment = std::min(_economy.inflation_payment * 124 / 74, MAX_INFLATION); DEBUG(oldloader, 3, "Finished converting game data"); DEBUG(oldloader, 1, "TTO savegame successfully converted"); |