Andrew Talbot : dmime: Remove unneeded casts.
Alexandre Julliard
julliard at winehq.org
Sat Dec 8 13:43:38 CST 2007
Module: wine
Branch: master
Commit: 301b867909c003d5e1c65ee7fe18d3cae19d6661
URL: http://source.winehq.org/git/wine.git/?a=commit;h=301b867909c003d5e1c65ee7fe18d3cae19d6661
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Fri Dec 7 23:01:46 2007 +0000
dmime: Remove unneeded casts.
---
dlls/dmime/audiopath.c | 10 +++++-----
dlls/dmime/performance.c | 30 +++++++++++++++---------------
2 files changed, 20 insertions(+), 20 deletions(-)
diff --git a/dlls/dmime/audiopath.c b/dlls/dmime/audiopath.c
index 2deb846..448160f 100644
--- a/dlls/dmime/audiopath.c
+++ b/dlls/dmime/audiopath.c
@@ -142,7 +142,7 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicAudioPath_GetObjectI
DMUSIC_CreateDirectMusicGraphImpl (&IID_IDirectMusicGraph, (LPVOID*)&pGraph, NULL);
This->pToolGraph = (IDirectMusicGraph*) pGraph;
}
- *ppObject = (LPDIRECTMUSICGRAPH) This->pToolGraph;
+ *ppObject = This->pToolGraph;
IDirectMusicGraph_AddRef((LPDIRECTMUSICGRAPH) *ppObject);
return S_OK;
}
@@ -158,7 +158,7 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicAudioPath_GetObjectI
case DMUS_PATH_PERFORMANCE:
{
/* TODO check wanted GUID */
- *ppObject = (LPDIRECTMUSICPERFORMANCE8) This->pPerf;
+ *ppObject = This->pPerf;
IUnknown_AddRef((LPUNKNOWN) *ppObject);
return S_OK;
}
@@ -167,16 +167,16 @@ static HRESULT WINAPI IDirectMusicAudioPathImpl_IDirectMusicAudioPath_GetObjectI
case DMUS_PATH_PERFORMANCE_GRAPH:
{
IDirectMusicGraph* pPerfoGraph = NULL;
- IDirectMusicPerformance8_GetGraph((LPDIRECTMUSICPERFORMANCE8) This->pPerf, &pPerfoGraph);
+ IDirectMusicPerformance8_GetGraph(This->pPerf, &pPerfoGraph);
if (NULL == pPerfoGraph) {
IDirectMusicGraphImpl* pGraph = NULL;
DMUSIC_CreateDirectMusicGraphImpl (&IID_IDirectMusicGraph, (LPVOID*)&pGraph, NULL);
- IDirectMusicPerformance8_SetGraph((LPDIRECTMUSICPERFORMANCE8) This->pPerf, (IDirectMusicGraph*) pGraph);
+ IDirectMusicPerformance8_SetGraph(This->pPerf, (IDirectMusicGraph*) pGraph);
/* we need release as SetGraph do an AddRef */
IDirectMusicGraph_Release((LPDIRECTMUSICGRAPH) pGraph);
pPerfoGraph = (LPDIRECTMUSICGRAPH) pGraph;
}
- *ppObject = (LPDIRECTMUSICGRAPH) pPerfoGraph;
+ *ppObject = pPerfoGraph;
return S_OK;
}
break;
diff --git a/dlls/dmime/performance.c b/dlls/dmime/performance.c
index 4013106..51a4b25 100644
--- a/dlls/dmime/performance.c
+++ b/dlls/dmime/performance.c
@@ -219,8 +219,8 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_Init (LPDIRECTMUSICPERFORMANC
}
if (NULL != pDirectSound) {
- This->pDirectSound = (IDirectSound*) pDirectSound;
- IDirectSound_AddRef((LPDIRECTSOUND) This->pDirectSound);
+ This->pDirectSound = pDirectSound;
+ IDirectSound_AddRef(This->pDirectSound);
} else {
HRESULT hr;
hr = DirectSoundCreate8(NULL, (LPDIRECTSOUND8*) &This->pDirectSound, NULL);
@@ -242,7 +242,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_Init (LPDIRECTMUSICPERFORMANC
if (NULL != ppDirectMusic && NULL != *ppDirectMusic) {
/* app creates it's own dmusic object and gives it to performance */
This->pDirectMusic = (IDirectMusic8*) *ppDirectMusic;
- IDirectMusic8_AddRef((LPDIRECTMUSIC8) This->pDirectMusic);
+ IDirectMusic8_AddRef(This->pDirectMusic);
} else {
/* app allows the performance to initialise itfself and needs a pointer to object*/
CoCreateInstance (&CLSID_DirectMusic, NULL, CLSCTX_INPROC_SERVER, &IID_IDirectMusic8, (void**)&This->pDirectMusic);
@@ -451,8 +451,8 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_GetGraph (LPDIRECTMUSICPERFOR
IDirectMusicPerformance8Impl *This = (IDirectMusicPerformance8Impl *)iface;
FIXME("(%p, %p): to check\n", This, ppGraph);
if (NULL != This->pToolGraph) {
- *ppGraph = (LPDIRECTMUSICGRAPH) This->pToolGraph;
- IDirectMusicGraph_AddRef((LPDIRECTMUSICGRAPH) *ppGraph);
+ *ppGraph = This->pToolGraph;
+ IDirectMusicGraph_AddRef(*ppGraph);
} else {
return E_FAIL;
}
@@ -466,11 +466,11 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_SetGraph (LPDIRECTMUSICPERFOR
if (NULL != This->pToolGraph) {
/* Todo clean buffers and tools before */
- IDirectMusicGraph_Release((LPDIRECTMUSICGRAPH) This->pToolGraph);
+ IDirectMusicGraph_Release(This->pToolGraph);
}
This->pToolGraph = pGraph;
if (NULL != This->pToolGraph) {
- IDirectMusicGraph_AddRef((LPDIRECTMUSICGRAPH) This->pToolGraph);
+ IDirectMusicGraph_AddRef(This->pToolGraph);
}
return S_OK;
}
@@ -690,11 +690,11 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CloseDown (LPDIRECTMUSICPERFO
CloseHandle(This->procThread);
}
if (NULL != This->pDirectSound) {
- IDirectSound_Release((LPDIRECTSOUND) This->pDirectSound);
+ IDirectSound_Release(This->pDirectSound);
This->pDirectSound = NULL;
}
if (NULL != This->pDirectMusic) {
- IDirectMusic8_Release((LPDIRECTMUSIC8) This->pDirectMusic);
+ IDirectMusic8_Release(This->pDirectMusic);
This->pDirectMusic = NULL;
}
return S_OK;
@@ -785,7 +785,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_InitAudio (LPDIRECTMUSICPERFO
This->pParams.dwFeatures = dwFlags;
This->pParams.clsidDefaultSynth = CLSID_DirectMusicSynthSink;
}
- hr = IDirectMusicPerformance8_CreateStandardAudioPath(iface, dwDefaultPathType, dwPChannelCount, FALSE, (IDirectMusicAudioPath**) &This->pDefaultPath);
+ hr = IDirectMusicPerformance8_CreateStandardAudioPath(iface, dwDefaultPathType, dwPChannelCount, FALSE, &This->pDefaultPath);
PostMessageToProcessMsgThread(This, PROCESSMSG_START);
@@ -829,7 +829,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateAudioPath (LPDIRECTMUSI
/** TODO */
- *ppNewPath = (LPDIRECTMUSICAUDIOPATH) pPath;
+ *ppNewPath = pPath;
return IDirectMusicAudioPath_Activate(*ppNewPath, fActivate);
}
@@ -921,7 +921,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_CreateStandardAudioPath (LPDI
}
default_path->pPrimary = buffer;
- *ppNewPath = (LPDIRECTMUSICAUDIOPATH) pPath;
+ *ppNewPath = pPath;
TRACE(" returning IDirectMusicPerformance interface at %p.\n", *ppNewPath);
@@ -933,13 +933,13 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_SetDefaultAudioPath (LPDIRECT
FIXME("(%p, %p): semi-stub\n", This, pAudioPath);
if (NULL != This->pDefaultPath) {
- IDirectMusicAudioPath_Release((LPDIRECTMUSICAUDIOPATH) This->pDefaultPath);
+ IDirectMusicAudioPath_Release(This->pDefaultPath);
((IDirectMusicAudioPathImpl*) This->pDefaultPath)->pPerf = NULL;
This->pDefaultPath = NULL;
}
This->pDefaultPath = pAudioPath;
if (NULL != This->pDefaultPath) {
- IDirectMusicAudioPath_AddRef((LPDIRECTMUSICAUDIOPATH) This->pDefaultPath);
+ IDirectMusicAudioPath_AddRef(This->pDefaultPath);
((IDirectMusicAudioPathImpl*) This->pDefaultPath)->pPerf = (IDirectMusicPerformance8*) This;
}
@@ -952,7 +952,7 @@ static HRESULT WINAPI IDirectMusicPerformance8Impl_GetDefaultAudioPath (LPDIRECT
FIXME("(%p, %p): semi-stub (%p)\n", This, ppAudioPath, This->pDefaultPath);
if (NULL != This->pDefaultPath) {
- *ppAudioPath = (LPDIRECTMUSICAUDIOPATH) This->pDefaultPath;
+ *ppAudioPath = This->pDefaultPath;
IDirectMusicAudioPath_AddRef(*ppAudioPath);
} else {
*ppAudioPath = NULL;
More information about the wine-cvs
mailing list