From 8412a40b903ebc62325501bb7508b3fefe747fd8 Mon Sep 17 00:00:00 2001 From: Jay Nabonne Date: Mon, 21 Jan 2019 12:35:55 +0000 Subject: [PATCH] Make some local variables const No real changes. --- src/qt/region.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qt/region.cpp b/src/qt/region.cpp index 47db60542f..8a71b4ab3c 100644 --- a/src/qt/region.cpp +++ b/src/qt/region.cpp @@ -113,16 +113,16 @@ wxRegion::wxRegion(const wxBitmap& bmp, const wxColour& transp, int tolerance) memset(raw.get(), 0, bmp.GetWidth()*bmp.GetHeight()); QImage img(bmp.GetHandle()->toImage()); - int r = transp.Red(), g = transp.Green(), b = transp.Blue(); + const int r = transp.Red(), g = transp.Green(), b = transp.Blue(); for(int y=0; y tolerance || abs(c.green() - g) > tolerance || abs(c.blue() - b) > tolerance) { - int ind = y*img.width()+x; + const int ind = y*img.width()+x; raw[ind>>3] |= 1<<(ind&7); } } @@ -189,7 +189,7 @@ bool wxRegion::DoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const wxCHECK_MSG( IsOk(), false, "Invalid region" ); - QRect bounding = M_REGIONDATA.boundingRect(); + const QRect bounding = M_REGIONDATA.boundingRect(); x = bounding.x(); y = bounding.y(); w = bounding.width();