forked from Mirrors/wine-wine
riched20: Remove superfluous pointer casts.
parent
5358233561
commit
d1a7e41b71
|
@ -54,7 +54,7 @@ static HRESULT WINAPI EnumFormatImpl_QueryInterface(IEnumFORMATETC *iface, REFII
|
||||||
|
|
||||||
if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IEnumFORMATETC)) {
|
if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IEnumFORMATETC)) {
|
||||||
IEnumFORMATETC_AddRef(iface);
|
IEnumFORMATETC_AddRef(iface);
|
||||||
*ppvObj = (LPVOID)This;
|
*ppvObj = This;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
*ppvObj = NULL;
|
*ppvObj = NULL;
|
||||||
|
@ -170,7 +170,7 @@ static HRESULT WINAPI DataObjectImpl_QueryInterface(IDataObject *iface, REFIID r
|
||||||
|
|
||||||
if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDataObject)) {
|
if (IsEqualGUID(riid, &IID_IUnknown) || IsEqualGUID(riid, &IID_IDataObject)) {
|
||||||
IDataObject_AddRef(iface);
|
IDataObject_AddRef(iface);
|
||||||
*ppvObj = (LPVOID)This;
|
*ppvObj = This;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
*ppvObj = NULL;
|
*ppvObj = NULL;
|
||||||
|
|
|
@ -2727,7 +2727,7 @@ RTFFlushCPOutputBuffer(RTF_Info *info)
|
||||||
info->dwCPOutputCount = 0;
|
info->dwCPOutputCount = 0;
|
||||||
|
|
||||||
RTFPutUnicodeString(info, buffer, length);
|
RTFPutUnicodeString(info, buffer, length);
|
||||||
heap_free((char *)buffer);
|
heap_free(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -1694,7 +1694,7 @@ LRESULT CreateIRichEditOle(ME_TextEditor *editor, LPVOID *ppObj)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
TRACE("Created %p\n",reo);
|
TRACE("Created %p\n",reo);
|
||||||
*ppObj = (LPVOID) reo;
|
*ppObj = reo;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -357,12 +357,12 @@ LPWSTR ME_ToUnicode(BOOL unicode, LPVOID psz)
|
||||||
assert(psz != NULL);
|
assert(psz != NULL);
|
||||||
|
|
||||||
if (unicode)
|
if (unicode)
|
||||||
return (LPWSTR)psz;
|
return psz;
|
||||||
else {
|
else {
|
||||||
WCHAR *tmp;
|
WCHAR *tmp;
|
||||||
int nChars = MultiByteToWideChar(CP_ACP, 0, (char *)psz, -1, NULL, 0);
|
int nChars = MultiByteToWideChar(CP_ACP, 0, psz, -1, NULL, 0);
|
||||||
if((tmp = ALLOC_N_OBJ(WCHAR, nChars)) != NULL)
|
if((tmp = ALLOC_N_OBJ(WCHAR, nChars)) != NULL)
|
||||||
MultiByteToWideChar(CP_ACP, 0, (char *)psz, -1, tmp, nChars);
|
MultiByteToWideChar(CP_ACP, 0, psz, -1, tmp, nChars);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3407,7 +3407,7 @@ static void test_EM_SETTEXTEX(void)
|
||||||
cls.cbWndExtra = 0;
|
cls.cbWndExtra = 0;
|
||||||
cls.hInstance = GetModuleHandleA(0);
|
cls.hInstance = GetModuleHandleA(0);
|
||||||
cls.hIcon = 0;
|
cls.hIcon = 0;
|
||||||
cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW);
|
cls.hCursor = LoadCursorA(0, IDC_ARROW);
|
||||||
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
|
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
|
||||||
cls.lpszMenuName = NULL;
|
cls.lpszMenuName = NULL;
|
||||||
cls.lpszClassName = "ParentTestClass";
|
cls.lpszClassName = "ParentTestClass";
|
||||||
|
@ -5413,7 +5413,7 @@ static void test_eventMask(void)
|
||||||
cls.cbWndExtra = 0;
|
cls.cbWndExtra = 0;
|
||||||
cls.hInstance = GetModuleHandleA(0);
|
cls.hInstance = GetModuleHandleA(0);
|
||||||
cls.hIcon = 0;
|
cls.hIcon = 0;
|
||||||
cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW);
|
cls.hCursor = LoadCursorA(0, IDC_ARROW);
|
||||||
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
|
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
|
||||||
cls.lpszMenuName = NULL;
|
cls.lpszMenuName = NULL;
|
||||||
cls.lpszClassName = "EventMaskParentClass";
|
cls.lpszClassName = "EventMaskParentClass";
|
||||||
|
@ -5503,7 +5503,7 @@ static void test_WM_NOTIFY(void)
|
||||||
cls.cbWndExtra = 0;
|
cls.cbWndExtra = 0;
|
||||||
cls.hInstance = GetModuleHandleA(0);
|
cls.hInstance = GetModuleHandleA(0);
|
||||||
cls.hIcon = 0;
|
cls.hIcon = 0;
|
||||||
cls.hCursor = LoadCursorA(0, (LPSTR)IDC_ARROW);
|
cls.hCursor = LoadCursorA(0, IDC_ARROW);
|
||||||
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
|
cls.hbrBackground = GetStockObject(WHITE_BRUSH);
|
||||||
cls.lpszMenuName = NULL;
|
cls.lpszMenuName = NULL;
|
||||||
cls.lpszClassName = "WM_NOTIFY_ParentClass";
|
cls.lpszClassName = "WM_NOTIFY_ParentClass";
|
||||||
|
|
|
@ -466,7 +466,7 @@ HRESULT WINAPI ITextHostImpl_TxNotify(ITextHost *iface,
|
||||||
case EN_STOPNOUNDO:
|
case EN_STOPNOUNDO:
|
||||||
{
|
{
|
||||||
/* FIXME: Verify this assumption that pv starts with NMHDR. */
|
/* FIXME: Verify this assumption that pv starts with NMHDR. */
|
||||||
NMHDR *info = (NMHDR*)pv;
|
NMHDR *info = pv;
|
||||||
if (!info)
|
if (!info)
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,7 @@ static HRESULT WINAPI fnTextSrv_QueryInterface(ITextServices * iface,
|
||||||
TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppv);
|
TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppv);
|
||||||
*ppv = NULL;
|
*ppv = NULL;
|
||||||
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_ITextServices))
|
if (IsEqualIID(riid, &IID_IUnknown) || IsEqualIID(riid, &IID_ITextServices))
|
||||||
*ppv = (LPVOID)This;
|
*ppv = This;
|
||||||
|
|
||||||
if (*ppv)
|
if (*ppv)
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,7 +55,7 @@ ME_UndoItem *ME_AddUndoItem(ME_TextEditor *editor, ME_DIType type, const ME_Disp
|
||||||
return NULL;
|
return NULL;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ME_DisplayItem *pItem = (ME_DisplayItem *)ALLOC_OBJ(ME_UndoItem);
|
ME_DisplayItem *pItem = ALLOC_OBJ(ME_UndoItem);
|
||||||
switch(type)
|
switch(type)
|
||||||
{
|
{
|
||||||
case diUndoPotentialEndTransaction:
|
case diUndoPotentialEndTransaction:
|
||||||
|
|
Loading…
Reference in New Issue