void ImageTestCase::CompareSavedImage()
{
+ // FIXME-VC6: Pre-declare the loop variables for compatibility with
+ // pre-standard compilers such as MSVC6 that don't implement proper scope
+ // for the variables declared in the for loops.
+ int i, x, y;
+
wxImage expected24("horse.png");
CPPUNIT_ASSERT( expected24.IsOk() );
CPPUNIT_ASSERT( !expected24.HasAlpha() );
numColours = expected8.CountColours();
unsigned char greys[256];
- for (size_t i = 0; i < 256; ++i)
+ for (i = 0; i < 256; ++i)
{
greys[i] = i;
}
int width = expected32.GetWidth();
int height = expected32.GetHeight();
- for (int y = 0; y < height; ++y)
+ for (y = 0; y < height; ++y)
{
- for (int x = 0; x < width; ++x)
+ for (x = 0; x < width; ++x)
{
expected32.SetAlpha(x, y, (x*y) & wxIMAGE_ALPHA_OPAQUE);
}
width = expected8.GetWidth();
height = expected8.GetHeight();
- for (int y = 0; y < height; ++y)
+ for (y = 0; y < height; ++y)
{
- for (int x = 0; x < width; ++x)
+ for (x = 0; x < width; ++x)
{
expected8.SetAlpha(x, y, (x*y) & wxIMAGE_ALPHA_OPAQUE);
}
unsigned char red[256], green[256], blue[256];
const wxPalette& pal = expected8.GetPalette();
const int paletteCount = pal.GetColoursCount();
- for (int i = 0; i < paletteCount; ++i)
+ for (i = 0; i < paletteCount; ++i)
{
expected8.GetPalette().GetRGB(i, &red[i], &green[i], &blue[i]);
}