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

@@ -235,7 +235,7 @@ bool DistanceAnnotation::IsBetter(const DistanceAnnotation *base, uint cap,
bool CapacityAnnotation::IsBetter(const CapacityAnnotation *base, uint cap,
int free_cap, uint dist) const
{
int min_cap = Path::GetCapacityRatio(min(base->free_capacity, free_cap), min(base->capacity, cap));
int min_cap = Path::GetCapacityRatio(std::min(base->free_capacity, free_cap), std::min(base->capacity, cap));
int this_cap = this->GetCapacityRatio();
if (min_cap == this_cap) {
/* If the capacities are the same and the other path isn't disconnected
@@ -354,7 +354,7 @@ uint MCF1stPass::FindCycleFlow(const PathVector &path, const Path *cycle_begin)
uint flow = UINT_MAX;
const Path *cycle_end = cycle_begin;
do {
flow = min(flow, cycle_begin->GetFlow());
flow = std::min(flow, cycle_begin->GetFlow());
cycle_begin = path[cycle_begin->GetNode()];
} while (cycle_begin != cycle_end);
return flow;