From 1bf787d521e07a1dacd4976d809fa46e5ac93a25 Mon Sep 17 00:00:00 2001 From: Andrew Talbot Date: Sat, 1 Dec 2007 16:14:50 +0000 Subject: [PATCH] comctl32: Remove unneeded casts. --- dlls/comctl32/commctrl.c | 2 +- dlls/comctl32/dpa.c | 6 +++--- dlls/comctl32/dsa.c | 2 +- dlls/comctl32/propsheet.c | 4 ++-- dlls/comctl32/toolbar.c | 4 ++-- dlls/comctl32/tooltips.c | 2 +- dlls/comctl32/trackbar.c | 2 +- dlls/comctl32/treeview.c | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/dlls/comctl32/commctrl.c b/dlls/comctl32/commctrl.c index 4604c0ec7ac..60ea2efebb0 100644 --- a/dlls/comctl32/commctrl.c +++ b/dlls/comctl32/commctrl.c @@ -343,7 +343,7 @@ MenuHelp (UINT uMsg, WPARAM wParam, LPARAM lParam, HMENU hMainMenu, else { /* menu item was selected */ if (HIWORD(wParam) & MF_POPUP) - uMenuID = (UINT)*(lpwIDs+1); + uMenuID = *(lpwIDs+1); else uMenuID = (UINT)LOWORD(wParam); TRACE("uMenuID = %u\n", uMenuID); diff --git a/dlls/comctl32/dpa.c b/dlls/comctl32/dpa.c index 4df556eaf26..e5f98b9e956 100644 --- a/dlls/comctl32/dpa.c +++ b/dlls/comctl32/dpa.c @@ -443,7 +443,7 @@ HDPA WINAPI DPA_Clone (const HDPA hdpa, const HDPA hdpaNew) /* create a new pointer array */ nNewItems = hdpaTemp->nGrow * - ((INT)((hdpa->nItemCount - 1) / hdpaTemp->nGrow) + 1); + (((hdpa->nItemCount - 1) / hdpaTemp->nGrow) + 1); nSize = nNewItems * sizeof(LPVOID); hdpaTemp->ptrs = HeapAlloc (hdpaTemp->hHeap, HEAP_ZERO_MEMORY, nSize); hdpaTemp->nMaxCount = nNewItems; @@ -583,7 +583,7 @@ BOOL WINAPI DPA_SetPtr (const HDPA hdpa, INT i, LPVOID p) if (hdpa->nMaxCount <= i) { /* resize the block of memory */ INT nNewItems = - hdpa->nGrow * ((INT)(((i+1) - 1) / hdpa->nGrow) + 1); + hdpa->nGrow * ((((i+1) - 1) / hdpa->nGrow) + 1); INT nSize = nNewItems * sizeof(LPVOID); if (hdpa->ptrs) @@ -654,7 +654,7 @@ LPVOID WINAPI DPA_DeletePtr (const HDPA hdpa, INT i) return NULL; hdpa->nMaxCount = nNewItems; - hdpa->ptrs = (LPVOID*)lpDest; + hdpa->ptrs = lpDest; } return lpTemp; diff --git a/dlls/comctl32/dsa.c b/dlls/comctl32/dsa.c index 5edb4fc084e..13f63e23de4 100644 --- a/dlls/comctl32/dsa.c +++ b/dlls/comctl32/dsa.c @@ -211,7 +211,7 @@ BOOL WINAPI DSA_SetItem (const HDSA hdsa, INT nIndex, LPVOID pSrc) else { /* resize the block of memory */ nNewItems = - hdsa->nGrow * ((INT)(((nIndex + 1) - 1) / hdsa->nGrow) + 1); + hdsa->nGrow * ((((nIndex + 1) - 1) / hdsa->nGrow) + 1); nSize = hdsa->nItemSize * nNewItems; lpTemp = ReAlloc (hdsa->pData, nSize); diff --git a/dlls/comctl32/propsheet.c b/dlls/comctl32/propsheet.c index cc9242d7556..9828d6fde1a 100644 --- a/dlls/comctl32/propsheet.c +++ b/dlls/comctl32/propsheet.c @@ -1527,7 +1527,7 @@ static VOID PROPSHEET_LoadWizardBitmaps(PropSheetInfo *psInfo) if ((psInfo->ppshheader.dwFlags & PSH_WATERMARK) && !(psInfo->ppshheader.dwFlags & PSH_USEHBMWATERMARK)) { - ((PropSheetInfo *)psInfo)->ppshheader.u4.hbmWatermark = + psInfo->ppshheader.u4.hbmWatermark = CreateMappedBitmap(psInfo->ppshheader.hInstance, (INT_PTR)psInfo->ppshheader.u4.pszbmWatermark, 0, NULL, 0); } @@ -1535,7 +1535,7 @@ static VOID PROPSHEET_LoadWizardBitmaps(PropSheetInfo *psInfo) if ((psInfo->ppshheader.dwFlags & PSH_HEADER) && !(psInfo->ppshheader.dwFlags & PSH_USEHBMHEADER)) { - ((PropSheetInfo *)psInfo)->ppshheader.u5.hbmHeader = + psInfo->ppshheader.u5.hbmHeader = CreateMappedBitmap(psInfo->ppshheader.hInstance, (INT_PTR)psInfo->ppshheader.u5.pszbmHeader, 0, NULL, 0); } } diff --git a/dlls/comctl32/toolbar.c b/dlls/comctl32/toolbar.c index 429444e15ae..b7a67257781 100644 --- a/dlls/comctl32/toolbar.c +++ b/dlls/comctl32/toolbar.c @@ -3190,7 +3190,7 @@ TOOLBAR_Customize (HWND hwnd) (LPWSTR)RT_DIALOG))) return FALSE; - if(!(template = (LPVOID)LoadResource (COMCTL32_hModule, hRes))) + if(!(template = LoadResource (COMCTL32_hModule, hRes))) return FALSE; ret = DialogBoxIndirectParamW ((HINSTANCE)GetWindowLongPtrW(hwnd, GWLP_HINSTANCE), @@ -5893,7 +5893,7 @@ TOOLBAR_LButtonUp (HWND hwnd, WPARAM wParam, LPARAM lParam) infoPtr->nButtonDown = -1; /* Issue NM_RELEASEDCAPTURE to parent to let him know it is released */ - TOOLBAR_SendNotify ((NMHDR *) &hdr, infoPtr, + TOOLBAR_SendNotify (&hdr, infoPtr, NM_RELEASEDCAPTURE); /* native issues TBN_ENDDRAG here, if _LBUTTONDOWN issued the diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c index 8740b63f8f5..401c344abd8 100644 --- a/dlls/comctl32/tooltips.c +++ b/dlls/comctl32/tooltips.c @@ -1109,7 +1109,7 @@ TOOLTIPS_AddToolW (HWND hwnd, WPARAM wParam, LPARAM lParam) if (IS_INTRESOURCE(lpToolInfo->lpszText)) { TRACE("add string id %x\n", LOWORD(lpToolInfo->lpszText)); - toolPtr->lpszText = (LPWSTR)lpToolInfo->lpszText; + toolPtr->lpszText = lpToolInfo->lpszText; } else if (lpToolInfo->lpszText) { if (lpToolInfo->lpszText == LPSTR_TEXTCALLBACKW) { diff --git a/dlls/comctl32/trackbar.c b/dlls/comctl32/trackbar.c index f95ec5edccd..7b6c708a1b2 100644 --- a/dlls/comctl32/trackbar.c +++ b/dlls/comctl32/trackbar.c @@ -811,7 +811,7 @@ TRACKBAR_UpdateToolTip (const TRACKBAR_INFO *infoPtr) ClientToScreen(infoPtr->hwndSelf, &pt); SendMessageW (infoPtr->hwndToolTip, TTM_TRACKPOSITION, - 0, (LPARAM)MAKELPARAM(pt.x, pt.y)); + 0, MAKELPARAM(pt.x, pt.y)); } diff --git a/dlls/comctl32/treeview.c b/dlls/comctl32/treeview.c index 29d56629562..aa12c4f959e 100644 --- a/dlls/comctl32/treeview.c +++ b/dlls/comctl32/treeview.c @@ -3996,7 +3996,7 @@ TREEVIEW_LButtonDown(TREEVIEW_INFO *infoPtr, LPARAM lParam) if(ht.hItem && (ht.flags & TVHT_ONITEM)) { infoPtr->focusedItem = ht.hItem; - InvalidateRect(hwnd, &(((HTREEITEM)(ht.hItem))->rect), TRUE); + InvalidateRect(hwnd, &ht.hItem->rect, TRUE); if(infoPtr->selectedItem) InvalidateRect(hwnd, &(infoPtr->selectedItem->rect), TRUE);