ddrawex: Avoid not necessary casts.
This commit is contained in:
parent
8836dea139
commit
95f263240b
|
@ -48,7 +48,7 @@ DECLARE_INTERFACE_(IDirectDrawFactory, IUnknown)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
IClassFactory *lpVtbl;
|
const IClassFactoryVtbl *lpVtbl;
|
||||||
LONG ref;
|
LONG ref;
|
||||||
HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, REFIID iid, LPVOID *ppObj);
|
HRESULT (*pfnCreateInstance)(IUnknown *pUnkOuter, REFIID iid, LPVOID *ppObj);
|
||||||
} IClassFactoryImpl;
|
} IClassFactoryImpl;
|
||||||
|
@ -59,7 +59,7 @@ typedef struct
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
IDirectDrawFactory *lpVtbl;
|
const IDirectDrawFactoryVtbl *lpVtbl;
|
||||||
LONG ref;
|
LONG ref;
|
||||||
} IDirectDrawFactoryImpl;
|
} IDirectDrawFactoryImpl;
|
||||||
|
|
||||||
|
|
|
@ -272,9 +272,9 @@ CreateDirectDrawFactory(IUnknown* UnkOuter, REFIID iid, void **obj)
|
||||||
return E_OUTOFMEMORY;
|
return E_OUTOFMEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
This->lpVtbl = (IDirectDrawFactory*) &IDirectDrawFactory_Vtbl;
|
This->lpVtbl = &IDirectDrawFactory_Vtbl;
|
||||||
|
|
||||||
hr = IDirectDrawFactory_QueryInterface(This->lpVtbl, iid, obj);
|
hr = IDirectDrawFactory_QueryInterface((IDirectDrawFactory *)This, iid, obj);
|
||||||
|
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
|
@ -315,7 +315,7 @@ HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
|
||||||
factory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*factory));
|
factory = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*factory));
|
||||||
if (factory == NULL) return E_OUTOFMEMORY;
|
if (factory == NULL) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
factory->lpVtbl = (IClassFactory*) &IClassFactory_Vtbl;
|
factory->lpVtbl = &IClassFactory_Vtbl;
|
||||||
factory->ref = 1;
|
factory->ref = 1;
|
||||||
|
|
||||||
factory->pfnCreateInstance = CreateDirectDrawFactory;
|
factory->pfnCreateInstance = CreateDirectDrawFactory;
|
||||||
|
|
Loading…
Reference in New Issue