From 9e90d41b58d6eafbf90a7435ea40c8c94e0aa1b1 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 3 May 2014 13:30:18 +1000 Subject: Using casts and an alternate PRectangle constructor to make XYPOSITION <-> int conversions and other conversions more consistent. --- src/XPM.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/XPM.cxx') 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(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(rc.top + (rc.Height() - height) / 2); + int startX = static_cast(rc.left + (rc.Width() - width) / 2); for (int y=0; y