Mike McCormack : comctl32: Remove a redundant variable.

Alexandre Julliard julliard at wine.codeweavers.com
Thu Nov 2 05:46:45 CST 2006


Module: wine
Branch: master
Commit: 5f89960a5656165aad99e507ea542556177a18db
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=5f89960a5656165aad99e507ea542556177a18db

Author: Mike McCormack <mike at codeweavers.com>
Date:   Thu Nov  2 12:15:01 2006 +0900

comctl32: Remove a redundant variable.

---

 dlls/comctl32/imagelist.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index ae24e06..580d3ab 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -116,7 +116,7 @@ IMAGELIST_InternalExpandBitmaps (HIMAGEL
 {
     HDC     hdcBitmap;
     HBITMAP hbmNewBitmap, hbmNull;
-    INT     nNewWidth, nNewCount;
+    INT     nNewCount;
     SIZE    sz;
 
     if ((himl->cCurImage + nImageCount <= himl->cMaxImage)
@@ -125,17 +125,16 @@ IMAGELIST_InternalExpandBitmaps (HIMAGEL
 
     if (cy == 0) cy = himl->cy;
     nNewCount = himl->cCurImage + nImageCount + himl->cGrow;
-    nNewWidth = nNewCount * himl->cx;
 
-    TRACE("Create expanded bitmaps : himl=%p x=%d y=%d count=%d\n", himl, nNewWidth, cy, nNewCount);
+    imagelist_get_bitmap_size(himl, nNewCount, cy, &sz);
+
+    TRACE("Create expanded bitmaps : himl=%p x=%d y=%d count=%d\n", himl, sz.cx, cy, nNewCount);
     hdcBitmap = CreateCompatibleDC (0);
 
     hbmNewBitmap = ImageList_CreateImage(hdcBitmap, himl, nNewCount, cy);
 
     if (hbmNewBitmap == 0)
-        ERR("creating new image bitmap (x=%d y=%d)!\n", nNewWidth, cy);
-
-    imagelist_get_bitmap_size(himl, nNewCount, cy, &sz);
+        ERR("creating new image bitmap (x=%d y=%d)!\n", sz.cx, cy);
 
     if (himl->cCurImage)
     {
@@ -150,7 +149,7 @@ IMAGELIST_InternalExpandBitmaps (HIMAGEL
 
     if (himl->flags & ILC_MASK)
     {
-        hbmNewBitmap = CreateBitmap (nNewWidth, cy, 1, 1, NULL);
+        hbmNewBitmap = CreateBitmap (sz.cx, sz.cy, 1, 1, NULL);
 
         if (hbmNewBitmap == 0)
             ERR("creating new mask bitmap!\n");




More information about the wine-cvs mailing list