From cda15af9657880e91ccf65603e109b202d9e78bf Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 6 Apr 2017 21:04:37 +1000 Subject: Added const where possible. --- src/XPM.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/XPM.cxx') diff --git a/src/XPM.cxx b/src/XPM.cxx index 646981a80..0e5795cc5 100644 --- a/src/XPM.cxx +++ b/src/XPM.cxx @@ -117,24 +117,24 @@ void XPM::Init(const char *const *linesForm) { for (int y=0; y(lform[x]); } } -void XPM::Draw(Surface *surface, PRectangle &rc) { +void XPM::Draw(Surface *surface, const PRectangle &rc) { if (pixels.empty()) { return; } // Centre the pixmap - int startY = static_cast(rc.top + (rc.Height() - height) / 2); - int startX = static_cast(rc.left + (rc.Width() - width) / 2); + const int startY = static_cast(rc.top + (rc.Height() - height) / 2); + const int startX = static_cast(rc.left + (rc.Width() - width) / 2); for (int y=0; y