From 0e7b1a46d521345eec57a2aa5a2a2bad3f0a80f0 Mon Sep 17 00:00:00 2001 From: Michael Stefaniuc Date: Fri, 29 Mar 2013 16:38:52 +0100 Subject: [PATCH] dplayx: Get rid of the unused DirectPlay3Data / DirectPlay4Data fields. --- dlls/dplayx/dplay.c | 56 +------------------------------------- dlls/dplayx/dplay_global.h | 13 +-------- 2 files changed, 2 insertions(+), 67 deletions(-) diff --git a/dlls/dplayx/dplay.c b/dlls/dplayx/dplay.c index 62a76f121e0..0ddde38e4c2 100644 --- a/dlls/dplayx/dplay.c +++ b/dlls/dplayx/dplay.c @@ -391,52 +391,6 @@ static BOOL DP_DestroyDirectPlay2( LPVOID lpDP ) return TRUE; } -static BOOL DP_CreateDirectPlay3( LPVOID lpDP ) -{ - IDirectPlay3AImpl *This = lpDP; - - This->dp3 = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->dp3) ) ); - if ( This->dp3 == NULL ) - { - return FALSE; - } - - return TRUE; -} - -static BOOL DP_DestroyDirectPlay3( LPVOID lpDP ) -{ - IDirectPlay3AImpl *This = lpDP; - - /* Delete the contents */ - HeapFree( GetProcessHeap(), 0, This->dp3 ); - - return TRUE; -} - -static BOOL DP_CreateDirectPlay4( LPVOID lpDP ) -{ - IDirectPlay4AImpl *This = lpDP; - - This->dp4 = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof( *(This->dp4) ) ); - if ( This->dp4 == NULL ) - { - return FALSE; - } - - return TRUE; -} - -static BOOL DP_DestroyDirectPlay4( LPVOID lpDP ) -{ - IDirectPlay3AImpl *This = lpDP; - - /* Delete the contents */ - HeapFree( GetProcessHeap(), 0, This->dp4 ); - - return TRUE; -} - /* Create a new interface */ HRESULT DP_CreateInterface @@ -492,11 +446,7 @@ HRESULT DP_CreateInterface } /* Initialize it */ - if ( DP_CreateIUnknown( *ppvObj ) && - DP_CreateDirectPlay2( *ppvObj ) && - DP_CreateDirectPlay3( *ppvObj ) && - DP_CreateDirectPlay4( *ppvObj ) - ) + if ( DP_CreateIUnknown( *ppvObj ) && DP_CreateDirectPlay2( *ppvObj ) ) { IDirectPlayX_AddRef( (LPDIRECTPLAY2A)*ppvObj ); @@ -504,8 +454,6 @@ HRESULT DP_CreateInterface } /* Initialize failed, destroy it */ - DP_DestroyDirectPlay4( *ppvObj ); - DP_DestroyDirectPlay3( *ppvObj ); DP_DestroyDirectPlay2( *ppvObj ); DP_DestroyIUnknown( *ppvObj ); @@ -614,8 +562,6 @@ static ULONG WINAPI DP_Release { /* If we're destroying the object, this must be the last ref of the last interface */ - DP_DestroyDirectPlay4( This ); - DP_DestroyDirectPlay3( This ); DP_DestroyDirectPlay2( This ); DP_DestroyIUnknown( This ); } diff --git a/dlls/dplayx/dplay_global.h b/dlls/dplayx/dplay_global.h index 273f09ea429..7578e046bc9 100644 --- a/dlls/dplayx/dplay_global.h +++ b/dlls/dplayx/dplay_global.h @@ -196,21 +196,10 @@ typedef struct tagDirectPlay2Data DPQ_HEAD( tagDP_MSG_REPLY_STRUCT_LIST ) repliesExpected; } DirectPlay2Data; -typedef struct tagDirectPlay3Data -{ - BOOL dummy; -} DirectPlay3Data; -typedef struct tagDirectPlay4Data -{ - BOOL dummy; -} DirectPlay4Data; - #define DP_IMPL_FIELDS \ LONG ulInterfaceRef; \ DirectPlayIUnknownData* unk; \ - DirectPlay2Data* dp2; \ - DirectPlay3Data* dp3; \ - DirectPlay4Data* dp4; + DirectPlay2Data* dp2; struct IDirectPlay2Impl {