Use std::min and std::max, not the misc versions.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user