Fix more GCC4 narrowing conversion warnings
Signed-off-by: Jérôme Duval <[email protected]>
This commit is contained in:
committed by
Jérôme Duval
parent
3bf9915247
commit
2e1347b2bf
@@ -176,7 +176,8 @@ Message::Draw(BView *view, int32 frame)
|
||||
buffer.Lock();
|
||||
|
||||
// Set up the colors
|
||||
rgb_color base_color = {rand() % 25, rand() % 25, rand() % 25};
|
||||
rgb_color base_color = {(uint8)(rand() % 25), (uint8)(rand() % 25),
|
||||
(uint8)(rand() % 25)};
|
||||
offscreen.SetHighColor(base_color);
|
||||
offscreen.SetLowColor(tint_color(base_color, 0.815F));
|
||||
offscreen.FillRect(offscreen.Bounds(), kCheckered);
|
||||
|
||||
@@ -439,7 +439,8 @@ ColorSlider::SetModeAndValues(selected_color_mode mode,
|
||||
R*=255.0; G*=255.0; B*=255.0;
|
||||
}
|
||||
|
||||
rgb_color color = { round(R), round(G), round(B), 255 };
|
||||
rgb_color color = {(uint8)round(R), (uint8)round(G),
|
||||
(uint8)round(B), 255 };
|
||||
|
||||
fMode = mode;
|
||||
SetOtherValues(value1, value2);
|
||||
@@ -638,7 +639,7 @@ void
|
||||
ColorSlider::_DrawColorLineY(BView *view, float y,
|
||||
int r, int g, int b)
|
||||
{
|
||||
rgb_color color = { r, g, b, 255 };
|
||||
rgb_color color = {(uint8)r, (uint8)g, (uint8)b, 255 };
|
||||
y = 255.0 - y;
|
||||
view->AddLine( BPoint(8.0, y + 5.0), BPoint(27.0, y + 5.0), color );
|
||||
}
|
||||
@@ -648,7 +649,7 @@ void
|
||||
ColorSlider::_DrawColorLineX(BView *view, float x,
|
||||
int r, int g, int b)
|
||||
{
|
||||
rgb_color color = { r, g, b, 255 };
|
||||
rgb_color color = {(uint8)r, (uint8)g, (uint8)b, 255 };
|
||||
BRect bounds(view->Bounds());
|
||||
x = (255.0 - x) * (bounds.Width() - 2.0) / 255.0 + 2.0;
|
||||
view->AddLine( BPoint(x, bounds.top + 2.0), BPoint(x, bounds.bottom - 2.0), color );
|
||||
|
||||
@@ -393,12 +393,12 @@ NodeManager::_SetUpVideoNodes(color_space preferredVideoFormat,
|
||||
format.type = B_MEDIA_RAW_VIDEO;
|
||||
media_raw_video_format videoFormat = {
|
||||
FramesPerSecond(), 1, 0,
|
||||
fVideoBounds.IntegerWidth(),
|
||||
(uint32)fVideoBounds.IntegerWidth(),
|
||||
B_VIDEO_TOP_LEFT_RIGHT, 1, 1,
|
||||
{
|
||||
preferredVideoFormat,
|
||||
fVideoBounds.IntegerWidth() + 1,
|
||||
fVideoBounds.IntegerHeight() + 1,
|
||||
(uint32)(fVideoBounds.IntegerWidth() + 1),
|
||||
(uint32)(fVideoBounds.IntegerHeight() + 1),
|
||||
0, 0, 0
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user