From: Dimitri Schoolwerth Date: Tue, 4 Jan 2011 13:33:48 +0000 (+0000) Subject: Minor wxPNGHandler cleanup. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/50fa616c353d39c3a5c948c62ded2d3f00400e1d Minor wxPNGHandler cleanup. Use int instead of png_uint_16 everywhere regarding number of palette entries, similar to how libpng exposes it (internally it uses png_uint_16). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/common/imagpng.cpp b/src/common/imagpng.cpp index 8088193617..700833b776 100644 --- a/src/common/imagpng.cpp +++ b/src/common/imagpng.cpp @@ -650,9 +650,9 @@ error: // ---------------------------------------------------------------------------- static int PaletteFind(const png_color& clr, - const png_color *pal, png_uint_16 palCount) + const png_color *pal, int palCount) { - for (png_uint_16 i = 0; i < palCount; i++) + for (int i = 0; i < palCount; ++i) { if ( (clr.red == pal[i].red) && (clr.green == pal[i].green) @@ -848,8 +848,7 @@ bool wxPNGHandler::SaveFile( wxImage *image, wxOutputStream& stream, bool verbos return false; } - png_uint_16 i; - for (i = 0; i < palCount; ++i) + for (int i = 0; i < palCount; ++i) { pal.GetRGB(i, &palette[i].red, &palette[i].green, &palette[i].blue); }