X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6fbf4a60fe7d1b293fabb200d43f4b8945fb522b..d68d85908b4f6073ae1c100abe3d9469fcd451d9:/src/common/imagbmp.cpp diff --git a/src/common/imagbmp.cpp b/src/common/imagbmp.cpp index 99e6a5fb28..02d6d6ecca 100644 --- a/src/common/imagbmp.cpp +++ b/src/common/imagbmp.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: imagbmp.cpp +// Name: src/common/imagbmp.cpp // Purpose: wxImage BMP,ICO and CUR handlers // Author: Robert Roebling, Chris Elliott // RCS-ID: $Id$ @@ -7,26 +7,23 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "imagbmp.h" -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" #ifdef __BORLANDC__ -#pragma hdrstop + #pragma hdrstop #endif -#include "wx/defs.h" - #if wxUSE_IMAGE +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/app.h" +#endif + #include "wx/imagbmp.h" #include "wx/bitmap.h" #include "wx/debug.h" -#include "wx/log.h" -#include "wx/app.h" #include "wx/filefn.h" #include "wx/wfstream.h" #include "wx/intl.h" @@ -1023,7 +1020,7 @@ bool wxICOHandler::SaveFile(wxImage *image, return false; } - int images = 1; // only generate one image + const int images = 1; // only generate one image // VS: This is a hack of sort - since ICO and CUR files are almost // identical, we have all the meat in wxICOHandler and check for @@ -1051,7 +1048,7 @@ bool wxICOHandler::SaveFile(wxImage *image, // for each iamage write a description ICONDIRENTRY: ICONDIRENTRY icondirentry; - for (int i = 0; i < images; i++) + for (int img = 0; img < images; img++) { wxImage mask; @@ -1084,10 +1081,10 @@ bool wxICOHandler::SaveFile(wxImage *image, { // just make a black mask all over: mask = image->Copy(); - int k, j; - for (k = 0; k < mask.GetWidth(); k++) + int i, j; + for (i = 0; i < mask.GetWidth(); i++) for (j = 0; j < mask.GetHeight(); j++) - mask.SetRGB(k, j, 0, 0, 0 ); + mask.SetRGB(i, j, 0, 0, 0 ); } // Set the formats for image and mask // (Windows never saves with more than 8 colors):