aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authornyamatongwe <unknown>2012-07-17 13:05:57 +1000
committernyamatongwe <unknown>2012-07-17 13:05:57 +1000
commit7f1fed72f2c9af337444a7bc954e0a5e6d733551 (patch)
tree0481e3112e07c249dce6889f6848a2cba1a88e64 /src
parentefedd005163aaa07073eac0f9fa7ac56f199ab39 (diff)
downloadscintilla-mirror-7f1fed72f2c9af337444a7bc954e0a5e6d733551.tar.gz
Avoid loss of precision warnings from Borland.
Diffstat (limited to 'src')
-rw-r--r--src/XPM.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/XPM.cxx b/src/XPM.cxx
index aeb94a9c6..db48ea227 100644
--- a/src/XPM.cxx
+++ b/src/XPM.cxx
@@ -356,10 +356,10 @@ const unsigned char *RGBAImage::Pixels() const {
void RGBAImage::SetPixel(int x, int y, ColourDesired colour, int alpha) {
unsigned char *pixel = &pixelBytes[0] + (y*width+x) * 4;
// RGBA
- pixel[0] = colour.GetRed();
- pixel[1] = colour.GetGreen();
- pixel[2] = colour.GetBlue();
- pixel[3] = alpha;
+ pixel[0] = static_cast<unsigned char>(colour.GetRed());
+ pixel[1] = static_cast<unsigned char>(colour.GetGreen());
+ pixel[2] = static_cast<unsigned char>(colour.GetBlue());
+ pixel[3] = static_cast<unsigned char>(alpha);
}
RGBAImageSet::RGBAImageSet() : height(-1), width(-1){