]> git.saurik.com Git - wxWidgets.git/commitdiff
Better fix for 'int i' used twice in the same block.
authorWłodzimierz Skiba <abx@abx.art.pl>
Tue, 13 Sep 2005 16:06:41 +0000 (16:06 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Tue, 13 Sep 2005 16:06:41 +0000 (16:06 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/imagbmp.cpp

index 99e6a5fb281d953202ee339ac798d9c8c2afdfd9..908813c133ae4004dfdb120995d364d614e28ffd 100644 (file)
@@ -1023,7 +1023,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 +1051,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 +1084,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):