Icon-O-Matic: Fix gcc4 build.

- Add explicit casts to uint8 since gcc4 otherwise warns about a narrowing
  conversion.
This commit is contained in:
Rene Gollent
2015-07-19 21:06:42 -04:00
parent f333ade309
commit f068ecea0a
2 changed files with 4 additions and 2 deletions
@@ -276,7 +276,8 @@ ColorField::SetModeAndValue(SelectedColorMode mode, float fixedValue)
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 };
if (fFixedValue != fixedValue || fMode != mode) {
fFixedValue = fixedValue;
@@ -323,7 +323,8 @@ ColorSlider::SetModeAndValues(SelectedColorMode mode,
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);