Use std::min and std::max, not the misc versions.

This commit is contained in:
2025-08-10 17:08:42 -04:00
parent 6c3bf19bbd
commit 640ccd02d3
26 changed files with 216 additions and 226 deletions

View File

@ -90,9 +90,9 @@ void OOFPosAbsLikeMgr::getSize (Requisition *containerReq, int *oofWidth,
int x, y, width, ascent, descent;
calcPosAndSizeChildOfChild (child, refWidth, refHeight, &x, &y, &width,
&ascent, &descent);
*oofWidth = max (*oofWidth, x + width) + containerBoxDiffWidth ();
*oofWidth = std::max (*oofWidth, x + width) + containerBoxDiffWidth ();
*oofHeight =
max (*oofHeight, y + ascent + descent) + containerBoxDiffHeight ();
std::max (*oofHeight, y + ascent + descent) + containerBoxDiffHeight ();
child->consideredForSize = true;
} else
@ -135,11 +135,11 @@ void OOFPosAbsLikeMgr::getExtremes (Extremes *containerExtr, int *oofMinWidth,
calcHPosAndSizeChildOfChild (child, containerExtr->minWidth,
childExtr.minWidth, &x, &width);
*oofMinWidth = max (*oofMinWidth, x + width);
*oofMinWidth = std::max (*oofMinWidth, x + width);
calcHPosAndSizeChildOfChild (child, containerExtr->maxWidth,
childExtr.maxWidth, &x, &width);
*oofMaxWidth = max (*oofMaxWidth, x + width);
*oofMaxWidth = std::max (*oofMaxWidth, x + width);
child->consideredForExtremes = true;
} else
@ -174,7 +174,7 @@ int OOFPosAbsLikeMgr::getAvailWidthOfChild (Widget *child, bool forceValue)
if (!getPosLeft (child, availWidth, &left)) left = 0;
if (!getPosRight (child, availWidth, &right)) right = 0;
width = max (availWidth - containerBoxDiffWidth () - left - right, 0);
width = std::max (availWidth - containerBoxDiffWidth () - left - right, 0);
} else
width = -1;
} else {
@ -188,7 +188,7 @@ int OOFPosAbsLikeMgr::getAvailWidthOfChild (Widget *child, bool forceValue)
}
if (width != -1)
width = max (width, child->getMinWidth (NULL, forceValue));
width = std::max (width, child->getMinWidth (NULL, forceValue));
DBG_OBJ_MSGF ("resize.oofm", 1, "=> %d", width);
DBG_OBJ_LEAVE ();
@ -218,7 +218,7 @@ int OOFPosAbsLikeMgr::getAvailHeightOfChild (Widget *child, bool forceValue)
if (!getPosBottom (child, availHeight, &bottom)) bottom = 0;
height =
max (availHeight - containerBoxDiffHeight () - top - bottom, 0);
std::max (availHeight - containerBoxDiffHeight () - top - bottom, 0);
} else
height = -1;
} else {