Commit 2d097f70 authored by Mike McCormack's avatar Mike McCormack Committed by Alexandre Julliard

comctl32: Remove unnecessary casts.

parent 60d6518c
...@@ -2578,7 +2578,7 @@ static void ranges_assert(RANGES ranges, LPCSTR desc, const char *func, int line ...@@ -2578,7 +2578,7 @@ static void ranges_assert(RANGES ranges, LPCSTR desc, const char *func, int line
static RANGES ranges_create(int count) static RANGES ranges_create(int count)
{ {
RANGES ranges = (RANGES)Alloc(sizeof(struct tagRANGES)); RANGES ranges = Alloc(sizeof(struct tagRANGES));
if (!ranges) return NULL; if (!ranges) return NULL;
ranges->hdpa = DPA_Create(count); ranges->hdpa = DPA_Create(count);
if (ranges->hdpa) return ranges; if (ranges->hdpa) return ranges;
...@@ -2613,7 +2613,7 @@ static RANGES ranges_clone(RANGES ranges) ...@@ -2613,7 +2613,7 @@ static RANGES ranges_clone(RANGES ranges)
for (i = 0; i < DPA_GetPtrCount(ranges->hdpa); i++) for (i = 0; i < DPA_GetPtrCount(ranges->hdpa); i++)
{ {
RANGE *newrng = (RANGE *)Alloc(sizeof(RANGE)); RANGE *newrng = Alloc(sizeof(RANGE));
if (!newrng) goto fail; if (!newrng) goto fail;
*newrng = *((RANGE*)DPA_GetPtr(ranges->hdpa, i)); *newrng = *((RANGE*)DPA_GetPtr(ranges->hdpa, i));
DPA_SetPtr(clone->hdpa, i, newrng); DPA_SetPtr(clone->hdpa, i, newrng);
...@@ -2705,7 +2705,7 @@ static BOOL ranges_add(RANGES ranges, RANGE range) ...@@ -2705,7 +2705,7 @@ static BOOL ranges_add(RANGES ranges, RANGE range)
TRACE("Adding new range\n"); TRACE("Adding new range\n");
/* create the brand new range to insert */ /* create the brand new range to insert */
newrgn = (RANGE *)Alloc(sizeof(RANGE)); newrgn = Alloc(sizeof(RANGE));
if(!newrgn) goto fail; if(!newrgn) goto fail;
*newrgn = range; *newrgn = range;
...@@ -2816,7 +2816,7 @@ static BOOL ranges_del(RANGES ranges, RANGE range) ...@@ -2816,7 +2816,7 @@ static BOOL ranges_del(RANGES ranges, RANGE range)
{ {
RANGE tmprgn = *chkrgn, *newrgn; RANGE tmprgn = *chkrgn, *newrgn;
if (!(newrgn = (RANGE *)Alloc(sizeof(RANGE)))) goto fail; if (!(newrgn = Alloc(sizeof(RANGE)))) goto fail;
newrgn->lower = chkrgn->lower; newrgn->lower = chkrgn->lower;
newrgn->upper = range.lower; newrgn->upper = range.lower;
chkrgn->lower = range.upper; chkrgn->lower = range.upper;
...@@ -3519,7 +3519,7 @@ static BOOL set_sub_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL i ...@@ -3519,7 +3519,7 @@ static BOOL set_sub_item(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, BOOL i
SUBITEM_INFO *tmpSubItem; SUBITEM_INFO *tmpSubItem;
INT i; INT i;
lpSubItem = (SUBITEM_INFO *)Alloc(sizeof(SUBITEM_INFO)); lpSubItem = Alloc(sizeof(SUBITEM_INFO));
if (!lpSubItem) return FALSE; if (!lpSubItem) return FALSE;
/* we could binary search here, if need be...*/ /* we could binary search here, if need be...*/
for (i = 1; i < DPA_GetPtrCount(hdpaSubItems); i++) for (i = 1; i < DPA_GetPtrCount(hdpaSubItems); i++)
...@@ -6247,7 +6247,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem, ...@@ -6247,7 +6247,7 @@ static INT LISTVIEW_InsertItemT(LISTVIEW_INFO *infoPtr, const LVITEMW *lpLVItem,
if (!is_assignable_item(lpLVItem, infoPtr->dwStyle)) return -1; if (!is_assignable_item(lpLVItem, infoPtr->dwStyle)) return -1;
if (!(lpItem = (ITEM_INFO *)Alloc(sizeof(ITEM_INFO)))) return -1; if (!(lpItem = Alloc(sizeof(ITEM_INFO)))) return -1;
/* insert item in listview control data structure */ /* insert item in listview control data structure */
if ( !(hdpaSubItems = DPA_Create(8)) ) goto fail; if ( !(hdpaSubItems = DPA_Create(8)) ) goto fail;
...@@ -7669,7 +7669,7 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs) ...@@ -7669,7 +7669,7 @@ static LRESULT LISTVIEW_Create(HWND hwnd, const CREATESTRUCTW *lpcs)
TRACE("(lpcs=%p)\n", lpcs); TRACE("(lpcs=%p)\n", lpcs);
/* initialize info pointer */ /* initialize info pointer */
infoPtr = (LISTVIEW_INFO *)Alloc(sizeof(LISTVIEW_INFO)); infoPtr = Alloc(sizeof(LISTVIEW_INFO));
if (!infoPtr) return -1; if (!infoPtr) return -1;
SetWindowLongPtrW(hwnd, 0, (DWORD_PTR)infoPtr); SetWindowLongPtrW(hwnd, 0, (DWORD_PTR)infoPtr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment