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/linkgraphjob.cpp | |
parent | c1fddb9a6ae5c3af6865461a7295788a341011a2 (diff) | |
download | openttd-9b800a96ed32720ff60b74e498a0e0a6351004f9.tar.xz |
Codechange: Remove min/max functions in favour of STL variants (#8502)
Diffstat (limited to 'src/linkgraph/linkgraphjob.cpp')
-rw-r--r-- | src/linkgraph/linkgraphjob.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/linkgraph/linkgraphjob.cpp b/src/linkgraph/linkgraphjob.cpp index e23c23b47..5e69dbeba 100644 --- a/src/linkgraph/linkgraphjob.cpp +++ b/src/linkgraph/linkgraphjob.cpp @@ -223,8 +223,8 @@ void LinkGraphJob::NodeAnnotation::Init(uint supply) */ void Path::Fork(Path *base, uint cap, int free_cap, uint dist) { - this->capacity = min(base->capacity, cap); - this->free_capacity = min(base->free_capacity, free_cap); + this->capacity = std::min(base->capacity, cap); + this->free_capacity = std::min(base->free_capacity, free_cap); this->distance = base->distance + dist; assert(this->distance > 0); if (this->parent != base) { @@ -250,7 +250,7 @@ uint Path::AddFlow(uint new_flow, LinkGraphJob &job, uint max_saturation) if (max_saturation != UINT_MAX) { uint usable_cap = edge.Capacity() * max_saturation / 100; if (usable_cap > edge.Flow()) { - new_flow = min(new_flow, usable_cap - edge.Flow()); + new_flow = std::min(new_flow, usable_cap - edge.Flow()); } else { return 0; } |