Mike McCormack : comctl32: Remove a redundant variable.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 14 05:14:19 CST 2006
Module: wine
Branch: master
Commit: f3c6114d75efb614a04814f53b5e98ee60670ee9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f3c6114d75efb614a04814f53b5e98ee60670ee9
Author: Mike McCormack <mike at codeweavers.com>
Date: Tue Nov 14 16:47:45 2006 +0900
comctl32: Remove a redundant variable.
---
dlls/comctl32/imagelist.c | 13 +++++--------
1 files changed, 5 insertions(+), 8 deletions(-)
diff --git a/dlls/comctl32/imagelist.c b/dlls/comctl32/imagelist.c
index 17b267d..6b7793e 100644
--- a/dlls/comctl32/imagelist.c
+++ b/dlls/comctl32/imagelist.c
@@ -2243,10 +2243,9 @@ ImageList_Replace (HIMAGELIST himl, INT
*/
INT WINAPI
-ImageList_ReplaceIcon (HIMAGELIST himl, INT i, HICON hIcon)
+ImageList_ReplaceIcon (HIMAGELIST himl, INT nIndex, HICON hIcon)
{
HDC hdcImage;
- INT nIndex;
HICON hBestFitIcon;
HBITMAP hbmOldSrc;
ICONINFO ii;
@@ -2255,14 +2254,14 @@ ImageList_ReplaceIcon (HIMAGELIST himl,
POINT pt;
INT i;
- TRACE("(%p %d %p)\n", himl, i, hIcon);
+ TRACE("(%p %d %p)\n", himl, nIndex, hIcon);
if (!is_valid(himl)) {
ERR("invalid image list\n");
return -1;
}
- if ((i >= himl->cMaxImage) || (i < -1)) {
- ERR("invalid image index %d / %d\n", i, himl->cMaxImage);
+ if ((nIndex >= himl->cMaxImage) || (nIndex < -1)) {
+ ERR("invalid image index %d / %d\n", nIndex, himl->cMaxImage);
return -1;
}
@@ -2299,15 +2298,13 @@ ImageList_ReplaceIcon (HIMAGELIST himl,
return -1;
}
- if (i == -1) {
+ if (nIndex == -1) {
if (himl->cCurImage + 1 > himl->cMaxImage)
IMAGELIST_InternalExpandBitmaps (himl, 1, 0, 0);
nIndex = himl->cCurImage;
himl->cCurImage++;
}
- else
- nIndex = i;
hdcImage = CreateCompatibleDC (0);
TRACE("hdcImage=%p\n", hdcImage);
More information about the wine-cvs
mailing list