=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: d3drm: Reorder d3drm creation function to avoid forward declarations.
Alexandre Julliard
julliard at winehq.org
Fri Jan 20 13:09:30 CST 2012
Module: wine
Branch: master
Commit: dfd7c70d37e13cb9c6fe79b02b7e10a57b2e9191
URL: http://source.winehq.org/git/wine.git/?a=commit;h=dfd7c70d37e13cb9c6fe79b02b7e10a57b2e9191
Author: André Hentschel <nerv at dawncrow.de>
Date: Thu Jan 19 22:05:06 2012 +0100
d3drm: Reorder d3drm creation function to avoid forward declarations.
---
dlls/d3drm/d3drm.c | 50 +++++++++++++++++++++++---------------------------
1 files changed, 23 insertions(+), 27 deletions(-)
diff --git a/dlls/d3drm/d3drm.c b/dlls/d3drm/d3drm.c
index 02a7c55..2850c7f 100644
--- a/dlls/d3drm/d3drm.c
+++ b/dlls/d3drm/d3drm.c
@@ -37,10 +37,6 @@ typedef struct {
LONG ref;
} IDirect3DRMImpl;
-static const struct IDirect3DRMVtbl Direct3DRM_Vtbl;
-static const struct IDirect3DRM2Vtbl Direct3DRM2_Vtbl;
-static const struct IDirect3DRM3Vtbl Direct3DRM3_Vtbl;
-
static inline IDirect3DRMImpl *impl_from_IDirect3DRM(IDirect3DRM *iface)
{
return CONTAINING_RECORD(iface, IDirect3DRMImpl, IDirect3DRM_iface);
@@ -56,29 +52,6 @@ static inline IDirect3DRMImpl *impl_from_IDirect3DRM3(IDirect3DRM3 *iface)
return CONTAINING_RECORD(iface, IDirect3DRMImpl, IDirect3DRM3_iface);
}
-HRESULT Direct3DRM_create(IUnknown** ppObj)
-{
- IDirect3DRMImpl* object;
-
- TRACE("(%p)\n", ppObj);
-
- object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMImpl));
- if (!object)
- {
- ERR("Out of memory\n");
- return E_OUTOFMEMORY;
- }
-
- object->IDirect3DRM_iface.lpVtbl = &Direct3DRM_Vtbl;
- object->IDirect3DRM2_iface.lpVtbl = &Direct3DRM2_Vtbl;
- object->IDirect3DRM3_iface.lpVtbl = &Direct3DRM3_Vtbl;
- object->ref = 1;
-
- *ppObj = (IUnknown*)&object->IDirect3DRM_iface;
-
- return S_OK;
-}
-
/*** IUnknown methods ***/
static HRESULT WINAPI IDirect3DRMImpl_QueryInterface(IDirect3DRM* iface, REFIID riid, void** ppvObject)
{
@@ -1378,3 +1351,26 @@ static const struct IDirect3DRM3Vtbl Direct3DRM3_Vtbl =
IDirect3DRM3Impl_SetOptions,
IDirect3DRM3Impl_GetOptions
};
+
+HRESULT Direct3DRM_create(IUnknown** ppObj)
+{
+ IDirect3DRMImpl* object;
+
+ TRACE("(%p)\n", ppObj);
+
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMImpl));
+ if (!object)
+ {
+ ERR("Out of memory\n");
+ return E_OUTOFMEMORY;
+ }
+
+ object->IDirect3DRM_iface.lpVtbl = &Direct3DRM_Vtbl;
+ object->IDirect3DRM2_iface.lpVtbl = &Direct3DRM2_Vtbl;
+ object->IDirect3DRM3_iface.lpVtbl = &Direct3DRM3_Vtbl;
+ object->ref = 1;
+
+ *ppObj = (IUnknown*)&object->IDirect3DRM_iface;
+
+ return S_OK;
+}
More information about the wine-cvs
mailing list