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

@ -57,11 +57,7 @@ int correctAvailWidthOfChild (core::Widget *widget, core::Widget *child,
int thisWidth = widget->getAvailWidth (forceValue);
DBG_OBJ_MSGF_O ("resize", 1, widget, "thisWidth = %d", thisWidth);
if (thisWidth != -1)
width =
lout::misc::max (lout::misc::min (width,
thisWidth
- widget->boxDiffWidth ()),
0);
width = std::max (std::min (width, thisWidth - widget->boxDiffWidth ()), 0);
}
DBG_OBJ_MSGF_O ("resize", 1, widget, "=> %d", width);
@ -96,11 +92,10 @@ void correctCorrectedRequisitionOfChild (core::Widget *widget,
int thisWidth = widget->getAvailWidth (true);
DBG_OBJ_MSGF_O ("resize", 1, widget, "thisWidth = %d", thisWidth);
int newWidth =
lout::misc::max (lout::misc::min (requisition->width,
std::max (std::min (requisition->width,
thisWidth - widget->boxDiffWidth ()),
0);
requisition->width = allowDecreaseWidth ?
newWidth : misc::max (requisition->width, newWidth);
requisition->width = allowDecreaseWidth ? newWidth : std::max (requisition->width, newWidth);
DBG_OBJ_LEAVE_O (widget);
}