app_server: Add casts to appease GCC2.

This commit is contained in:
Augustin Cavalier 2022-07-12 18:40:48 -04:00
parent 112fc3532b
commit 9d80098e24
2 changed files with 4 additions and 4 deletions

View File

@ -207,7 +207,7 @@ DefaultDecorator::_DrawFrame(BRect rect)
return;
// TODO: While this works, it does not look so crisp at higher resolutions.
#define COLORS_INDEX(i, borderWidth, nominalLimit) ((float(i) / float(borderWidth)) * nominalLimit)
#define COLORS_INDEX(i, borderWidth, nominalLimit) int32((float(i) / float(borderWidth)) * nominalLimit)
// Draw the border frame
BRect border = BRect(fTopBorder.LeftTop(), fBottomBorder.RightBottom());
@ -231,7 +231,7 @@ DefaultDecorator::_DrawFrame(BRect rect)
if (fTitleBarRect.IsValid()) {
// grey along the bottom of the tab
// (overwrites "white" from frame)
const int overdraw = ceilf(fBorderWidth / 5.0f);
const int overdraw = (int)ceilf(fBorderWidth / 5.0f);
for (int i = 1; i <= overdraw; i++) {
fDrawingEngine->StrokeLine(
BPoint(fTitleBarRect.left + 2, fTitleBarRect.bottom + i),
@ -300,7 +300,7 @@ DefaultDecorator::_DrawFrame(BRect rect)
if (fTitleBarRect.IsValid() && fTopTab->look != kLeftTitledWindowLook) {
// grey along the bottom of the tab
// (overwrites "white" from frame)
const int overdraw = ceilf(fBorderWidth / 5.0f);
const int overdraw = (int)ceilf(fBorderWidth / 5.0f);
for (int i = 1; i <= overdraw; i++) {
fDrawingEngine->StrokeLine(
BPoint(fTitleBarRect.left + 2, fTitleBarRect.bottom + i),

View File

@ -262,7 +262,7 @@ TabDecorator::_DoLayout()
fBorderWidth = 0;
}
fBorderWidth *= scaleFactor;
fBorderWidth = int32(fBorderWidth * scaleFactor);
fResizeKnobSize = kResizeKnobSize * scaleFactor;
fBorderResizeLength = kBorderResizeLength * scaleFactor;