ControlLook: Use std::max() instead of max_c()

It's a little silly to cast an integer literal to an int32 but the compiler
insisted.
This commit is contained in:
John Scipione
2015-03-16 20:19:53 -04:00
parent 6905b4faed
commit c7756ee15a
+2 -2
View File
@@ -487,7 +487,7 @@ BControlLook::DrawCheckBox(BView* view, BRect& rect, const BRect& updateRect,
view->SetHighColor(markColor);
rect.InsetBy(2, 2);
view->SetPenSize(max_c(1.0, ceilf(rect.Width() / 3.5)));
view->SetPenSize(std::max(1.0f, ceilf(rect.Width() / 3.5)));
view->SetDrawingMode(B_OP_OVER);
view->StrokeLine(rect.LeftTop(), rect.RightBottom());
@@ -1264,7 +1264,7 @@ BControlLook::DrawSliderHashMarks(BView* view, BRect& rect,
darkColor = tint_color(base, 1.14);
}
int32 hashMarkCount = max_c(count, 2);
int32 hashMarkCount = std::max(count, (int32)2);
// draw at least two hashmarks at min/max if
// fHashMarks != B_HASH_MARKS_NONE
float factor;