From: Michael Stefaniuc Subject: [PATCH 01/11] dmstyle: Pass objects instead of ifaces to helpers. Message-Id: <20150701071222.GA12024@redhat.com> Date: Wed, 1 Jul 2015 09:12:22 +0200 --- dlls/dmstyle/chordtrack.c | 8 ++++---- dlls/dmstyle/styletrack.c | 18 ++++++++++-------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/dlls/dmstyle/chordtrack.c b/dlls/dmstyle/chordtrack.c index 40f9018..1c7cb97 100644 --- a/dlls/dmstyle/chordtrack.c +++ b/dlls/dmstyle/chordtrack.c @@ -277,9 +277,9 @@ static HRESULT WINAPI IDirectMusicChordTrack_IPersistStream_IsDirty (LPPERSISTST return S_FALSE; } -static HRESULT IDirectMusicChordTrack_IPersistStream_ParseChordTrackList (LPPERSISTSTREAM iface, DMUS_PRIVATE_CHUNK* pChunk, IStream* pStm) { - - ICOM_THIS_MULTI(IDirectMusicChordTrack, PersistStreamVtbl, iface); +static HRESULT parse_chordtrack_list(IDirectMusicChordTrack *This, DMUS_PRIVATE_CHUNK *pChunk, + IStream *pStm) +{ DMUS_PRIVATE_CHUNK Chunk; DWORD ListSize[3], ListCount[3]; LARGE_INTEGER liMove; /* used when skipping chunks */ @@ -371,7 +371,7 @@ static HRESULT WINAPI IDirectMusicChordTrack_IPersistStream_Load (LPPERSISTSTREA switch (Chunk.fccID) { case DMUS_FOURCC_CHORDTRACK_LIST: { TRACE_(dmfile)(": Chord track list\n"); - hr = IDirectMusicChordTrack_IPersistStream_ParseChordTrackList (iface, &Chunk, pStm); + hr = parse_chordtrack_list(This, &Chunk, pStm); if (FAILED(hr)) return hr; break; } diff --git a/dlls/dmstyle/styletrack.c b/dlls/dmstyle/styletrack.c index 4678552..8e02783 100644 --- a/dlls/dmstyle/styletrack.c +++ b/dlls/dmstyle/styletrack.c @@ -279,8 +279,9 @@ static HRESULT WINAPI IDirectMusicStyleTrack_IPersistStream_IsDirty (LPPERSISTST return S_FALSE; } -static HRESULT IDirectMusicStyleTrack_IPersistStream_ParseStyleRef (LPPERSISTSTREAM iface, DMUS_PRIVATE_CHUNK* pChunk, IStream* pStm) { - ICOM_THIS_MULTI(IDirectMusicStyleTrack, PersistStreamVtbl, iface); +static HRESULT parse_style_ref(IDirectMusicStyleTrack *This, DMUS_PRIVATE_CHUNK *pChunk, + IStream *pStm) +{ DMUS_PRIVATE_CHUNK Chunk; DWORD ListSize[3], ListCount[3]; LARGE_INTEGER liMove; /* used when skipping chunks */ @@ -325,7 +326,8 @@ static HRESULT IDirectMusicStyleTrack_IPersistStream_ParseStyleRef (LPPERSISTSTR */ case DMUS_FOURCC_REF_LIST: { FIXME_(dmfile)(": DMRF (DM References) list, not yet handled\n"); - hr = IDirectMusicUtils_IPersistStream_ParseReference (iface, &Chunk, pStm, &pObject); + hr = IDirectMusicUtils_IPersistStream_ParseReference((IPersistStream*)&This->PersistStreamVtbl, + &Chunk, pStm, &pObject); if (FAILED(hr)) { ERR(": could not load Reference\n"); return hr; @@ -361,9 +363,9 @@ static HRESULT IDirectMusicStyleTrack_IPersistStream_ParseStyleRef (LPPERSISTSTR return S_OK; } -static HRESULT IDirectMusicStyleTrack_IPersistStream_ParseStyleTrackList (LPPERSISTSTREAM iface, DMUS_PRIVATE_CHUNK* pChunk, IStream* pStm) { - - /*ICOM_THIS_MULTI(IDirectMusicStyleTrack, PersistStreamVtbl, iface);*/ +static HRESULT parse_styletrack_list(IDirectMusicStyleTrack *This, DMUS_PRIVATE_CHUNK *pChunk, + IStream *pStm) +{ DMUS_PRIVATE_CHUNK Chunk; DWORD ListSize[3], ListCount[3]; LARGE_INTEGER liMove; /* used when skipping chunks */ @@ -390,7 +392,7 @@ static HRESULT IDirectMusicStyleTrack_IPersistStream_ParseStyleTrackList (LPPERS switch (Chunk.fccID) { case DMUS_FOURCC_STYLE_REF_LIST: { TRACE_(dmfile)(": STYLE_REF list\n"); - hr = IDirectMusicStyleTrack_IPersistStream_ParseStyleRef (iface, &Chunk, pStm); + hr = parse_style_ref(This, &Chunk, pStm); if (FAILED(hr)) return hr; break; } @@ -434,7 +436,7 @@ static HRESULT WINAPI IDirectMusicStyleTrack_IPersistStream_Load (LPPERSISTSTREA switch (Chunk.fccID) { case DMUS_FOURCC_STYLE_TRACK_LIST: { TRACE_(dmfile)(": Chord track list\n"); - hr = IDirectMusicStyleTrack_IPersistStream_ParseStyleTrackList (iface, &Chunk, pStm); + hr = parse_styletrack_list(This, &Chunk, pStm); if (FAILED(hr)) return hr; break; } -- 2.1.0