[4/5] d3drm: Reorder viewport creation function to avoid forward declarations
André Hentschel
nerv at dawncrow.de
Tue Jan 17 16:00:17 CST 2012
---
dlls/d3drm/viewport.c | 44 +++++++++++++++++++++-----------------------
1 files changed, 21 insertions(+), 23 deletions(-)
diff --git a/dlls/d3drm/viewport.c b/dlls/d3drm/viewport.c
index 4bfc5cc..2847069 100644
--- a/dlls/d3drm/viewport.c
+++ b/dlls/d3drm/viewport.c
@@ -37,34 +37,11 @@ typedef struct {
LONG ref;
} IDirect3DRMViewportImpl;
-static const struct IDirect3DRMViewportVtbl Direct3DRMViewport_Vtbl;
-
static inline IDirect3DRMViewportImpl *impl_from_IDirect3DRMViewport(IDirect3DRMViewport *iface)
{
return CONTAINING_RECORD(iface, IDirect3DRMViewportImpl, IDirect3DRMViewport_iface);
}
-HRESULT Direct3DRMViewport_create(IUnknown** ppObj)
-{
- IDirect3DRMViewportImpl* object;
-
- TRACE("(%p)\n", ppObj);
-
- object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMViewportImpl));
- if (!object)
- {
- ERR("Out of memory\n");
- return E_OUTOFMEMORY;
- }
-
- object->IDirect3DRMViewport_iface.lpVtbl = &Direct3DRMViewport_Vtbl;
- object->ref = 1;
-
- *ppObj = (IUnknown*)object;
-
- return S_OK;
-}
-
/*** IUnknown methods ***/
static HRESULT WINAPI IDirect3DRMViewportImpl_QueryInterface(IDirect3DRMViewport* iface,
REFIID riid, void** object)
@@ -506,3 +483,24 @@ static const struct IDirect3DRMViewportVtbl Direct3DRMViewport_Vtbl =
IDirect3DRMViewportImpl_GetProjection,
IDirect3DRMViewportImpl_GetDirect3DViewport
};
+
+HRESULT Direct3DRMViewport_create(IUnknown** ppObj)
+{
+ IDirect3DRMViewportImpl* object;
+
+ TRACE("(%p)\n", ppObj);
+
+ object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(IDirect3DRMViewportImpl));
+ if (!object)
+ {
+ ERR("Out of memory\n");
+ return E_OUTOFMEMORY;
+ }
+
+ object->IDirect3DRMViewport_iface.lpVtbl = &Direct3DRMViewport_Vtbl;
+ object->ref = 1;
+
+ *ppObj = (IUnknown*)object;
+
+ return S_OK;
+}
--
Best Regards, André Hentschel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Nachrichtenteil als Anhang
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20120117/12c7d5af/attachment.ksh>
More information about the wine-patches
mailing list