Felix Nawothnig : comctl32: Remove unnecessary and misused mask member from TAB_ITEM.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Feb 7 04:53:11 CST 2007


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

Author: Felix Nawothnig <flexo at holycrap.org>
Date:   Tue Feb  6 22:10:05 2007 +0100

comctl32: Remove unnecessary and misused mask member from TAB_ITEM.

---

 dlls/comctl32/tab.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/dlls/comctl32/tab.c b/dlls/comctl32/tab.c
index d17f6a7..7ecd977 100644
--- a/dlls/comctl32/tab.c
+++ b/dlls/comctl32/tab.c
@@ -82,7 +82,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(tab);
 
 typedef struct
 {
-  UINT   mask;
   DWORD  dwState;
   LPWSTR pszText;
   INT    iImage;
@@ -217,9 +216,8 @@ TAB_DumpItemInternal(TAB_INFO *infoPtr,
 	TAB_ITEM *ti;
 
 	ti = TAB_GetItem(infoPtr, iItem);
-	TRACE("tab %d, mask=0x%08x, dwState=0x%08x, pszText=%s, iImage=%d\n",
-	      iItem, ti->mask, ti->dwState, debugstr_w(ti->pszText),
-	      ti->iImage);
+	TRACE("tab %d, dwState=0x%08x, pszText=%s, iImage=%d\n",
+	      iItem, ti->dwState, debugstr_w(ti->pszText), ti->iImage);
 	TRACE("tab %d, rect.left=%d, rect.top(row)=%d\n",
 	      iItem, ti->rect.left, ti->rect.top);
     }
@@ -1737,7 +1735,7 @@ TAB_DrawItemInterior
      *
      * Draw the icon.
      */
-    if (infoPtr->himl && (item->mask & TCIF_IMAGE))
+    if (infoPtr->himl && item->iImage != -1)
     {
       INT cx;
       INT cy;
@@ -2639,7 +2637,6 @@ TAB_InsertItemT (TAB_INFO *infoPtr, WPAR
 
   item = TAB_GetItem(infoPtr, iItem);
 
-  item->mask = pti->mask;
   item->pszText = NULL;
 
   if (pti->mask & TCIF_TEXT)
@@ -2846,7 +2843,7 @@ static LRESULT TAB_DeleteItem (TAB_INFO
 	
 	TAB_InvalidateTabArea(infoPtr);
 
-	if ((item->mask & TCIF_TEXT) && item->pszText)
+        if (item->pszText)
             Free(item->pszText);
 
 	infoPtr->uNumItem--;




More information about the wine-cvs mailing list