Use std::min and std::max, not the misc versions.
This commit is contained in:
@ -486,11 +486,11 @@ void FltkViewport::scrollTo (int x, int y)
|
||||
int hdiff = vscrollbar->visible () ? SCROLLBAR_THICKNESS : 0;
|
||||
int vdiff = hscrollbar->visible () ? SCROLLBAR_THICKNESS : 0;
|
||||
|
||||
x = misc::min (x, canvasWidth - w() + hdiff);
|
||||
x = misc::max (x, 0);
|
||||
x = std::min (x, canvasWidth - w() + hdiff);
|
||||
x = std::max (x, 0);
|
||||
|
||||
y = misc::min (y, canvasHeight - h() + vdiff);
|
||||
y = misc::max (y, 0);
|
||||
y = std::min (y, canvasHeight - h() + vdiff);
|
||||
y = std::max (y, 0);
|
||||
|
||||
if (x == scrollX && y == scrollY) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user