Henri Verbeet : wined3d: Remove some redundant returns.
Alexandre Julliard
julliard at winehq.org
Wed Dec 30 10:18:13 CST 2009
Module: wine
Branch: master
Commit: ea2f7a2739d76fbe2a7c034e7bd79ecc218531d1
URL: http://source.winehq.org/git/wine.git/?a=commit;h=ea2f7a2739d76fbe2a7c034e7bd79ecc218531d1
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Tue Dec 29 17:10:20 2009 +0100
wined3d: Remove some redundant returns.
---
dlls/wined3d/buffer.c | 3 ---
dlls/wined3d/device.c | 15 +++------------
dlls/wined3d/state.c | 4 ----
dlls/wined3d/surface.c | 4 ----
dlls/wined3d/surface_base.c | 1 -
5 files changed, 3 insertions(+), 24 deletions(-)
diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c
index 36e9acc..51e594d 100644
--- a/dlls/wined3d/buffer.c
+++ b/dlls/wined3d/buffer.c
@@ -134,8 +134,6 @@ fail:
if (This->buffer_object) GL_EXTCALL(glDeleteBuffersARB(1, &This->buffer_object));
This->buffer_object = 0;
LEAVE_GL();
-
- return;
}
static BOOL buffer_process_converted_attribute(struct wined3d_buffer *This,
@@ -936,7 +934,6 @@ static void STDMETHODCALLTYPE buffer_PreLoad(IWineD3DBuffer *iface)
end:
context_release(context);
- return;
}
static WINED3DRESOURCETYPE STDMETHODCALLTYPE buffer_GetType(IWineD3DBuffer *iface)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index e025ccd..5b1ca8c 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -1297,14 +1297,9 @@ static void IWineD3DDeviceImpl_LoadLogo(IWineD3DDeviceImpl *This, const char *fi
IWineD3DDevice_ColorFill((IWineD3DDevice *) This, This->logo_surface, NULL, 0xffffffff);
}
- out:
- if(dcb) {
- DeleteDC(dcb);
- }
- if(hbm) {
- DeleteObject(hbm);
- }
- return;
+out:
+ if (dcb) DeleteDC(dcb);
+ if (hbm) DeleteObject(hbm);
}
/* Context activation is done by the caller. */
@@ -1809,8 +1804,6 @@ static void WINAPI IWineD3DDeviceImpl_SetMultithreaded(IWineD3DDevice *iface) {
/*For now just store the flag(needed in case of ddraw) */
This->createParms.BehaviorFlags |= WINED3DCREATE_MULTITHREADED;
-
- return;
}
static HRESULT WINAPI IWineD3DDeviceImpl_SetDisplayMode(IWineD3DDevice *iface, UINT iSwapChain,
@@ -6631,7 +6624,6 @@ static void WINAPI IWineD3DDeviceImpl_SetGammaRamp(IWineD3DDevice * iface, UINT
IWineD3DSwapChain_SetGammaRamp(swapchain, Flags, pRamp);
IWineD3DSwapChain_Release(swapchain);
}
- return;
}
static void WINAPI IWineD3DDeviceImpl_GetGammaRamp(IWineD3DDevice *iface, UINT iSwapChain, WINED3DGAMMARAMP* pRamp) {
@@ -6643,7 +6635,6 @@ static void WINAPI IWineD3DDeviceImpl_GetGammaRamp(IWineD3DDevice *iface, UINT i
IWineD3DSwapChain_GetGammaRamp(swapchain, pRamp);
IWineD3DSwapChain_Release(swapchain);
}
- return;
}
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index d9ece33..1c29dbf 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -4473,8 +4473,6 @@ static inline void drawPrimitiveTraceDataLocations(const struct wined3d_stream_i
TRACE_STRIDED((dataLocations), WINED3D_FFP_TEXCOORD5);
TRACE_STRIDED((dataLocations), WINED3D_FFP_TEXCOORD6);
TRACE_STRIDED((dataLocations), WINED3D_FFP_TEXCOORD7);
-
- return;
}
static void streamsrc(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
@@ -4878,8 +4876,6 @@ static void light(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3
glEnable(GL_LIGHT0 + Index);
checkGLcall("glEnable(GL_LIGHT0 + Index)");
}
-
- return;
}
static void scissorrect(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index f956927..8dcc691 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -809,7 +809,6 @@ void surface_internal_preload(IWineD3DSurface *iface, enum WINED3DSRGB srgb)
if (context) context_release(context);
}
- return;
}
static void WINAPI IWineD3DSurfaceImpl_PreLoad(IWineD3DSurface *iface) {
@@ -928,8 +927,6 @@ static void WINAPI IWineD3DSurfaceImpl_UnLoad(IWineD3DSurface *iface) {
}
context_release(context);
-
- return;
}
/* ******************************************************
@@ -2757,7 +2754,6 @@ static void WINAPI IWineD3DSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL
if (context) context_release(context);
}
- return;
}
#include <errno.h>
diff --git a/dlls/wined3d/surface_base.c b/dlls/wined3d/surface_base.c
index 538add4..33e3d3e 100644
--- a/dlls/wined3d/surface_base.c
+++ b/dlls/wined3d/surface_base.c
@@ -1866,7 +1866,6 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_LockRect(IWineD3DSurface *iface, WINED3DL
void WINAPI IWineD3DBaseSurfaceImpl_BindTexture(IWineD3DSurface *iface, BOOL srgb) {
ERR("Should not be called on base texture\n");
- return;
}
/* TODO: think about moving this down to resource? */
More information about the wine-cvs
mailing list