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/linkgraph/linkgraph.h | |
parent | c1fddb9a6ae5c3af6865461a7295788a341011a2 (diff) | |
download | openttd-9b800a96ed32720ff60b74e498a0e0a6351004f9.tar.xz |
Codechange: Remove min/max functions in favour of STL variants (#8502)
Diffstat (limited to 'src/linkgraph/linkgraph.h')
-rw-r--r-- | src/linkgraph/linkgraph.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linkgraph/linkgraph.h b/src/linkgraph/linkgraph.h index 7362b7d56..99348daa1 100644 --- a/src/linkgraph/linkgraph.h +++ b/src/linkgraph/linkgraph.h @@ -113,7 +113,7 @@ public: * Get the date of the last update to any part of the edge's capacity. * @return Last update. */ - Date LastUpdate() const { return max(this->edge.last_unrestricted_update, this->edge.last_restricted_update); } + Date LastUpdate() const { return std::max(this->edge.last_unrestricted_update, this->edge.last_restricted_update); } }; /** @@ -453,7 +453,7 @@ public: */ inline static uint Scale(uint val, uint target_age, uint orig_age) { - return val > 0 ? max(1U, val * target_age / orig_age) : 0; + return val > 0 ? std::max(1U, val * target_age / orig_age) : 0; } /** Bare constructor, only for save/load. */ |