Commit f3d1d479 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

ddraw: Get rid of a couple of redundant else-statements.

parent 997be9c4
...@@ -150,44 +150,50 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, ...@@ -150,44 +150,50 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
TRACE("(%p) returning IDirectDrawSurface7 interface at %p\n", This, *obj); TRACE("(%p) returning IDirectDrawSurface7 interface at %p\n", This, *obj);
return S_OK; return S_OK;
} }
else if (IsEqualGUID(riid, &IID_IDirectDrawSurface4))
if (IsEqualGUID(riid, &IID_IDirectDrawSurface4))
{ {
IDirectDrawSurface4_AddRef(&This->IDirectDrawSurface4_iface); IDirectDrawSurface4_AddRef(&This->IDirectDrawSurface4_iface);
*obj = &This->IDirectDrawSurface4_iface; *obj = &This->IDirectDrawSurface4_iface;
TRACE("(%p) returning IDirectDrawSurface4 interface at %p\n", This, *obj); TRACE("(%p) returning IDirectDrawSurface4 interface at %p\n", This, *obj);
return S_OK; return S_OK;
} }
else if (IsEqualGUID(riid, &IID_IDirectDrawSurface3))
if (IsEqualGUID(riid, &IID_IDirectDrawSurface3))
{ {
IDirectDrawSurface3_AddRef(&This->IDirectDrawSurface3_iface); IDirectDrawSurface3_AddRef(&This->IDirectDrawSurface3_iface);
*obj = &This->IDirectDrawSurface3_iface; *obj = &This->IDirectDrawSurface3_iface;
TRACE("(%p) returning IDirectDrawSurface3 interface at %p\n", This, *obj); TRACE("(%p) returning IDirectDrawSurface3 interface at %p\n", This, *obj);
return S_OK; return S_OK;
} }
else if (IsEqualGUID(riid, &IID_IDirectDrawSurface2))
if (IsEqualGUID(riid, &IID_IDirectDrawSurface2))
{ {
IDirectDrawSurface2_AddRef(&This->IDirectDrawSurface2_iface); IDirectDrawSurface2_AddRef(&This->IDirectDrawSurface2_iface);
*obj = &This->IDirectDrawSurface2_iface; *obj = &This->IDirectDrawSurface2_iface;
TRACE("(%p) returning IDirectDrawSurface2 interface at %p\n", This, *obj); TRACE("(%p) returning IDirectDrawSurface2 interface at %p\n", This, *obj);
return S_OK; return S_OK;
} }
else if (IsEqualGUID(riid, &IID_IDirectDrawSurface))
if (IsEqualGUID(riid, &IID_IDirectDrawSurface))
{ {
IDirectDrawSurface_AddRef(&This->IDirectDrawSurface_iface); IDirectDrawSurface_AddRef(&This->IDirectDrawSurface_iface);
*obj = &This->IDirectDrawSurface_iface; *obj = &This->IDirectDrawSurface_iface;
TRACE("(%p) returning IDirectDrawSurface interface at %p\n", This, *obj); TRACE("(%p) returning IDirectDrawSurface interface at %p\n", This, *obj);
return S_OK; return S_OK;
} }
else if( IsEqualGUID(riid, &IID_IDirectDrawGammaControl) )
if (IsEqualGUID(riid, &IID_IDirectDrawGammaControl))
{ {
IDirectDrawGammaControl_AddRef(&This->IDirectDrawGammaControl_iface); IDirectDrawGammaControl_AddRef(&This->IDirectDrawGammaControl_iface);
*obj = &This->IDirectDrawGammaControl_iface; *obj = &This->IDirectDrawGammaControl_iface;
TRACE("(%p) returning IDirectDrawGammaControl interface at %p\n", This, *obj); TRACE("(%p) returning IDirectDrawGammaControl interface at %p\n", This, *obj);
return S_OK; return S_OK;
} }
else if( IsEqualGUID(riid, &IID_D3DDEVICE_WineD3D) ||
IsEqualGUID(riid, &IID_IDirect3DHALDevice)|| if (IsEqualGUID(riid, &IID_D3DDEVICE_WineD3D)
IsEqualGUID(riid, &IID_IDirect3DRGBDevice) ) || IsEqualGUID(riid, &IID_IDirect3DHALDevice)
|| IsEqualGUID(riid, &IID_IDirect3DRGBDevice))
{ {
IDirect3DDevice7 *d3d; IDirect3DDevice7 *d3d;
IDirect3DDeviceImpl *device_impl; IDirect3DDeviceImpl *device_impl;
...@@ -208,8 +214,9 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface, ...@@ -208,8 +214,9 @@ static HRESULT WINAPI ddraw_surface7_QueryInterface(IDirectDrawSurface7 *iface,
WARN("Unable to create a IDirect3DDevice instance, returning E_NOINTERFACE\n"); WARN("Unable to create a IDirect3DDevice instance, returning E_NOINTERFACE\n");
return E_NOINTERFACE; return E_NOINTERFACE;
} }
else if (IsEqualGUID( &IID_IDirect3DTexture, riid ) ||
IsEqualGUID( &IID_IDirect3DTexture2, riid )) if (IsEqualGUID( &IID_IDirect3DTexture2, riid)
|| IsEqualGUID(&IID_IDirect3DTexture, riid))
{ {
if (IsEqualGUID( &IID_IDirect3DTexture, riid )) if (IsEqualGUID( &IID_IDirect3DTexture, riid ))
{ {
......
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