Use std::min and std::max, not the misc versions.
This commit is contained in:
12
dw/ui.cc
12
dw/ui.cc
@ -59,7 +59,7 @@ void Embed::getExtremesSimpl (Extremes *extremes)
|
||||
resource->getExtremes (extremes);
|
||||
correctExtremes (extremes, false);
|
||||
extremes->adjustmentWidth =
|
||||
misc::min (extremes->minWidthIntrinsic, extremes->minWidth);
|
||||
std::min (extremes->minWidthIntrinsic, extremes->minWidth);
|
||||
}
|
||||
|
||||
void Embed::sizeAllocateImpl (Allocation *allocation)
|
||||
@ -408,7 +408,7 @@ int ComplexButtonResource::getAvailWidthOfChild (Widget *child, bool forceValue)
|
||||
if (embedWidth == -1)
|
||||
return -1;
|
||||
else
|
||||
return misc::max (embedWidth - 2 * reliefXThickness (), 0);
|
||||
return std::max (embedWidth - 2 * reliefXThickness (), 0);
|
||||
}
|
||||
|
||||
int ComplexButtonResource::getAvailHeightOfChild (Widget *child,
|
||||
@ -418,7 +418,7 @@ int ComplexButtonResource::getAvailHeightOfChild (Widget *child,
|
||||
if (embedHeight == -1)
|
||||
return -1;
|
||||
else
|
||||
return misc::max (embedHeight - 2 * reliefYThickness (), 0);
|
||||
return std::max (embedHeight - 2 * reliefYThickness (), 0);
|
||||
}
|
||||
|
||||
void ComplexButtonResource::correctRequisitionOfChild (Widget *child,
|
||||
@ -435,14 +435,14 @@ void ComplexButtonResource::correctRequisitionOfChild (Widget *child,
|
||||
/* FIXME: Typo for getAvailWidth()? */
|
||||
int availWidth = getEmbed()->getAvailHeight (false);
|
||||
if (availWidth != -1) {
|
||||
int baseWidth = misc::max (availWidth
|
||||
int baseWidth = std::max (availWidth
|
||||
- getEmbed()->boxDiffWidth ()
|
||||
- 2 * reliefXThickness (),
|
||||
0);
|
||||
int newWidth =
|
||||
child->applyPerWidth (baseWidth, child->getStyle()->width);
|
||||
requisition->width = allowDecreaseWidth ?
|
||||
newWidth : misc::max (requisition->width, newWidth);
|
||||
newWidth : std::max (requisition->width, newWidth);
|
||||
}
|
||||
} else
|
||||
getEmbed()->correctReqWidthOfChildNoRec (child, requisition,
|
||||
@ -464,7 +464,7 @@ void ComplexButtonResource::correctExtremesOfChild (Widget *child,
|
||||
if (style::isPerLength (child->getStyle()->width)) {
|
||||
int availWidth = getEmbed()->getAvailHeight (false);
|
||||
if (availWidth != -1) {
|
||||
int baseWidth = misc::max (availWidth
|
||||
int baseWidth = std::max (availWidth
|
||||
- getEmbed()->boxDiffWidth ()
|
||||
- 2 * reliefXThickness (),
|
||||
0);
|
||||
|
||||
Reference in New Issue
Block a user