diff options
Diffstat (limited to 'src/widget_type.h')
-rw-r--r-- | src/widget_type.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widget_type.h b/src/widget_type.h index 3a36d9aad..1b1677039 100644 --- a/src/widget_type.h +++ b/src/widget_type.h @@ -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))); } /** |