Use std::min and std::max, not the misc versions.
This commit is contained in:
38
dw/table.cc
38
dw/table.cc
@ -296,7 +296,7 @@ int Table::calcAvailWidthForDescendant (Widget *child)
|
||||
int width = (colspanEff - 1) * getStyle()->hBorderSpacing;
|
||||
for (int i = 0; i < colspanEff; i++)
|
||||
width += colWidths->get (col + i);
|
||||
width = misc::max (width, 0);
|
||||
width = std::max (width, 0);
|
||||
|
||||
if (child != actualChild) {
|
||||
// For table cells (direct children: child == actualChild), CSS
|
||||
@ -308,7 +308,7 @@ int Table::calcAvailWidthForDescendant (Widget *child)
|
||||
child->calcFinalWidth (child->getStyle(), -1, this, 0, true, &corrWidth);
|
||||
|
||||
// But better not exceed it ... (TODO: Only here?)
|
||||
width = misc::min (width, corrWidth);
|
||||
width = std::min (width, corrWidth);
|
||||
}
|
||||
|
||||
DBG_OBJ_MSGF ("resize", 1, "=> %d", width);
|
||||
@ -496,7 +496,7 @@ void Table::addCell (Widget *widget, int colspan, int rowspan)
|
||||
}
|
||||
|
||||
if (colspan == 0) {
|
||||
colspanEff = misc::max (numCols - curCol, 1);
|
||||
colspanEff = std::max (numCols - curCol, 1);
|
||||
rowClosed = true;
|
||||
} else
|
||||
colspanEff = colspan;
|
||||
@ -654,10 +654,10 @@ int Table::getExtreme (core::Extremes *extremes, ExtrMod mod)
|
||||
return extremes->minWidthIntrinsic;
|
||||
|
||||
case MIN_MIN:
|
||||
return misc::min (extremes->minWidth, extremes->minWidthIntrinsic);
|
||||
return std::min (extremes->minWidth, extremes->minWidthIntrinsic);
|
||||
|
||||
case MAX_MIN:
|
||||
return misc::max (extremes->minWidth, extremes->minWidthIntrinsic);
|
||||
return std::max (extremes->minWidth, extremes->minWidthIntrinsic);
|
||||
|
||||
case MAX:
|
||||
return extremes->maxWidth;
|
||||
@ -915,7 +915,7 @@ void Table::actuallyCalcCellSizes (bool calcHeights)
|
||||
// width for correction. (TODO: Is this necessary?)
|
||||
int corrWidth =
|
||||
Table::getAdjustTableMinWidth () ? extremes.adjustmentWidth : 0;
|
||||
int totalWidth = misc::max (availWidth, corrWidth)
|
||||
int totalWidth = std::max (availWidth, corrWidth)
|
||||
- ((numCols + 1) * getStyle()->hBorderSpacing + boxDiffWidth ());
|
||||
|
||||
DBG_OBJ_MSGF ("resize", 1,
|
||||
@ -1144,7 +1144,7 @@ void Table::actuallyCalcCellSizes (bool calcHeights)
|
||||
} else {
|
||||
// Normal apportioning.
|
||||
int width =
|
||||
totalWidthSpecified ? totalWidth : misc::min (totalWidth, maxWidth);
|
||||
totalWidthSpecified ? totalWidth : std::min (totalWidth, maxWidth);
|
||||
DBG_OBJ_MSGF ("resize", 1, "case 3: else; width = %d", width);
|
||||
apportion2 (width, 0, colExtremes->size() - 1, MIN, MAX, NULL, colWidths,
|
||||
0);
|
||||
@ -1155,7 +1155,7 @@ void Table::actuallyCalcCellSizes (bool calcHeights)
|
||||
// performance gain actually play a role?
|
||||
for (int col = 0; col < colExtremes->size(); col++) {
|
||||
if (colWidths->get (col) != oldColWidths->get (col))
|
||||
redrawX = lout::misc::min (redrawX, colWidths->get (col));
|
||||
redrawX = std::min (redrawX, colWidths->get (col));
|
||||
}
|
||||
|
||||
DBG_IF_RTFL {
|
||||
@ -1208,7 +1208,7 @@ void Table::actuallyCalcCellSizes (bool calcHeights)
|
||||
children->get(n)->cell.widget->sizeRequest (&childRequisition);
|
||||
childHeight = childRequisition.ascent + childRequisition.descent;
|
||||
if (children->get(n)->cell.rowspan == 1) {
|
||||
rowHeight = misc::max (rowHeight, childHeight);
|
||||
rowHeight = std::max (rowHeight, childHeight);
|
||||
} else {
|
||||
rowSpanCells->increase();
|
||||
rowSpanCells->set(rowSpanCells->size()-1, n);
|
||||
@ -1330,23 +1330,23 @@ void Table::forceCalcColumnExtremes ()
|
||||
cellExtremes.minWidth, cellExtremes.maxWidth);
|
||||
|
||||
colExtremes->getRef(col)->minWidthIntrinsic =
|
||||
misc::max (colExtremes->getRef(col)->minWidthIntrinsic,
|
||||
std::max (colExtremes->getRef(col)->minWidthIntrinsic,
|
||||
cellExtremes.minWidthIntrinsic);
|
||||
colExtremes->getRef(col)->maxWidthIntrinsic =
|
||||
misc::max (colExtremes->getRef(col)->minWidthIntrinsic,
|
||||
colExtremes->getRef(col)->maxWidthIntrinsic,
|
||||
cellExtremes.maxWidthIntrinsic);
|
||||
std::max( colExtremes->getRef(col)->minWidthIntrinsic,
|
||||
std::max( colExtremes->getRef(col)->maxWidthIntrinsic,
|
||||
cellExtremes.maxWidthIntrinsic ) );
|
||||
|
||||
colExtremes->getRef(col)->minWidth =
|
||||
misc::max (colExtremes->getRef(col)->minWidth,
|
||||
std::max (colExtremes->getRef(col)->minWidth,
|
||||
cellExtremes.minWidth);
|
||||
colExtremes->getRef(col)->maxWidth =
|
||||
misc::max (colExtremes->getRef(col)->minWidth,
|
||||
colExtremes->getRef(col)->maxWidth,
|
||||
cellExtremes.maxWidth);
|
||||
std::max( colExtremes->getRef(col)->minWidth,
|
||||
std::max( colExtremes->getRef(col)->maxWidth,
|
||||
cellExtremes.maxWidth ) );
|
||||
|
||||
colExtremes->getRef(col)->adjustmentWidth =
|
||||
misc::max (colExtremes->getRef(col)->adjustmentWidth,
|
||||
std::max (colExtremes->getRef(col)->adjustmentWidth,
|
||||
cellExtremes.adjustmentWidth);
|
||||
|
||||
core::style::Length childWidth =
|
||||
@ -1487,7 +1487,7 @@ void Table::calcExtremesSpanMultiCols (int col, int cs,
|
||||
|
||||
// For cases where min and max are somewhat confused:
|
||||
setColExtreme (col + j, maxExtrMod, extrData,
|
||||
misc::max (getColExtreme (col + j, minExtrMod,
|
||||
std::max (getColExtreme (col + j, minExtrMod,
|
||||
extrData),
|
||||
getColExtreme (col + j, maxExtrMod,
|
||||
extrData)));
|
||||
|
||||
Reference in New Issue
Block a user