Skip to content

Commit

Permalink
Icon-O-Matic: Fix gcc4 build.
Browse files Browse the repository at this point in the history
- Add explicit casts to uint8 since gcc4 otherwise warns about a narrowing
  conversion.
  • Loading branch information
anevilyak committed Jul 20, 2015
1 parent f333ade commit f068ece
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f068ece

Please sign in to comment.