diff --git a/tests/graphics/clippingbox.cpp b/tests/graphics/clippingbox.cpp index 9cf1071cca..832105609b 100644 --- a/tests/graphics/clippingbox.cpp +++ b/tests/graphics/clippingbox.cpp @@ -646,33 +646,32 @@ void ClippingBoxTestCaseBase::CheckClipRect(int x, int y, int width, int height) for( int py = ymin; py <= ymax; py++ ) for( int px = xmin; px <= xmax; px++ ) { - wxColour c; unsigned char r = img.GetRed(px, py); unsigned char g = img.GetGreen(px, py); unsigned char b = img.GetBlue(px, py); - c.Set(r, g, b); + const wxColour col(r, g, b); wxString msgColour; if ( px >= x && px <= x + (width-1) && py >= y && py <= y + (height-1) ) { // Pixel inside the box. - if ( c != s_fgColour ) + if ( col != s_fgColour ) { msgColour = wxString::Format(wxS("Invalid colour drawn at (%i, %i): Actual: %s Expected: %s"), - px, py, c.GetAsString().mbc_str(), s_fgColour.GetAsString().mbc_str()); + px, py, col.GetAsString().mbc_str(), s_fgColour.GetAsString().mbc_str()); } } else { // Pixel outside the box. - if ( c != s_bgColour ) + if ( col != s_bgColour ) { msgColour = wxString::Format(wxS("Invalid colour drawn at (%i, %i): Actual: %s Expected: %s"), - px, py, c.GetAsString().mbc_str(), s_bgColour.GetAsString().mbc_str()); + px, py, col.GetAsString().mbc_str(), s_bgColour.GetAsString().mbc_str()); } }