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

@@ -687,7 +687,7 @@ public:
assert(capacity <= MAX_UVALUE(uint16));
this->cap = capacity;
if (this->cap + this->pos > this->count) this->pos = max(0, this->count - this->cap);
if (this->cap + this->pos > this->count) this->pos = std::max(0, this->count - this->cap);
}
void SetCapacityFromWidget(Window *w, int widget, int padding = 0);
@@ -717,7 +717,7 @@ public:
case SS_BIG: difference *= this->cap; break;
default: break;
}
this->SetPosition(Clamp(this->pos + difference, 0, max(this->count - this->cap, 0)));
this->SetPosition(Clamp(this->pos + difference, 0, std::max(this->count - this->cap, 0)));
}
/**