diff options
author | Neil <nyamatongwe@gmail.com> | 2014-05-03 13:30:18 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2014-05-03 13:30:18 +1000 |
commit | 9e90d41b58d6eafbf90a7435ea40c8c94e0aa1b1 (patch) | |
tree | c3e24e4e33c77abd593fc7f6d88f61c07c33d57b /src/XPM.cxx | |
parent | 32cae5a3a2c79282abba21a07d60130f05d86cea (diff) | |
download | scintilla-mirror-9e90d41b58d6eafbf90a7435ea40c8c94e0aa1b1.tar.gz |
Using casts and an alternate PRectangle constructor to make XYPOSITION <-> int
conversions and other conversions more consistent.
Diffstat (limited to 'src/XPM.cxx')
-rw-r--r-- | src/XPM.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/XPM.cxx b/src/XPM.cxx index e1d91846d..b3c9b338f 100644 --- a/src/XPM.cxx +++ b/src/XPM.cxx @@ -109,7 +109,7 @@ void XPM::Init(const char *const *linesForm) { if (*colourDef == '#') { colour.Set(colourDef); } else { - codeTransparent = code; + codeTransparent = static_cast<char>(code); } colourCodeTable[code] = colour; } @@ -127,8 +127,8 @@ void XPM::Draw(Surface *surface, PRectangle &rc) { return; } // Centre the pixmap - int startY = rc.top + (rc.Height() - height) / 2; - int startX = rc.left + (rc.Width() - width) / 2; + int startY = static_cast<int>(rc.top + (rc.Height() - height) / 2); + int startX = static_cast<int>(rc.left + (rc.Width() - width) / 2); for (int y=0; y<height; y++) { int prevCode = 0; int xStartRun = 0; |