Skip to content

Commit d3c5fe8

Browse files
rbernonjulliard
authored andcommitted
dmband: Get rid of the IDirectMusicBandImpl typedef.
1 parent be00852 commit d3c5fe8

File tree

2 files changed

+19
-23
lines changed

2 files changed

+19
-23
lines changed

dlls/dmband/band.c

+18-21
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,23 @@
2323
WINE_DEFAULT_DEBUG_CHANNEL(dmband);
2424
WINE_DECLARE_DEBUG_CHANNEL(dmfile);
2525

26-
27-
/*****************************************************************************
28-
* IDirectMusicBandImpl implementation
29-
*/
30-
typedef struct IDirectMusicBandImpl {
26+
struct band
27+
{
3128
IDirectMusicBand IDirectMusicBand_iface;
3229
struct dmobject dmobj;
3330
LONG ref;
3431
struct list Instruments;
35-
} IDirectMusicBandImpl;
32+
};
3633

37-
static inline IDirectMusicBandImpl *impl_from_IDirectMusicBand(IDirectMusicBand *iface)
34+
static inline struct band *impl_from_IDirectMusicBand(IDirectMusicBand *iface)
3835
{
39-
return CONTAINING_RECORD(iface, IDirectMusicBandImpl, IDirectMusicBand_iface);
36+
return CONTAINING_RECORD(iface, struct band, IDirectMusicBand_iface);
4037
}
4138

4239
static HRESULT WINAPI band_QueryInterface(IDirectMusicBand *iface, REFIID riid,
4340
void **ret_iface)
4441
{
45-
IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface);
42+
struct band *This = impl_from_IDirectMusicBand(iface);
4643

4744
TRACE("(%p, %s, %p)\n", This, debugstr_dmguid(riid), ret_iface);
4845

@@ -65,7 +62,7 @@ static HRESULT WINAPI band_QueryInterface(IDirectMusicBand *iface, REFIID riid,
6562

6663
static ULONG WINAPI band_AddRef(IDirectMusicBand *iface)
6764
{
68-
IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface);
65+
struct band *This = impl_from_IDirectMusicBand(iface);
6966
LONG ref = InterlockedIncrement(&This->ref);
7067

7168
TRACE("(%p) ref=%ld\n", This, ref);
@@ -75,7 +72,7 @@ static ULONG WINAPI band_AddRef(IDirectMusicBand *iface)
7572

7673
static ULONG WINAPI band_Release(IDirectMusicBand *iface)
7774
{
78-
IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface);
75+
struct band *This = impl_from_IDirectMusicBand(iface);
7976
LONG ref = InterlockedDecrement(&This->ref);
8077

8178
TRACE("(%p) ref=%ld\n", This, ref);
@@ -88,7 +85,7 @@ static ULONG WINAPI band_Release(IDirectMusicBand *iface)
8885
static HRESULT WINAPI band_CreateSegment(IDirectMusicBand *iface,
8986
IDirectMusicSegment **segment)
9087
{
91-
IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface);
88+
struct band *This = impl_from_IDirectMusicBand(iface);
9289
HRESULT hr;
9390
DMUS_BAND_PARAM bandparam;
9491

@@ -112,15 +109,15 @@ static HRESULT WINAPI band_CreateSegment(IDirectMusicBand *iface,
112109
static HRESULT WINAPI band_Download(IDirectMusicBand *iface,
113110
IDirectMusicPerformance *pPerformance)
114111
{
115-
IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface);
112+
struct band *This = impl_from_IDirectMusicBand(iface);
116113
FIXME("(%p, %p): stub\n", This, pPerformance);
117114
return S_OK;
118115
}
119116

120117
static HRESULT WINAPI band_Unload(IDirectMusicBand *iface,
121118
IDirectMusicPerformance *pPerformance)
122119
{
123-
IDirectMusicBandImpl *This = impl_from_IDirectMusicBand(iface);
120+
struct band *This = impl_from_IDirectMusicBand(iface);
124121
FIXME("(%p, %p): stub\n", This, pPerformance);
125122
return S_OK;
126123
}
@@ -186,7 +183,7 @@ static const IDirectMusicObjectVtbl band_object_vtbl =
186183

187184
#define DMUS_IO_INSTRUMENT_DX7_SIZE offsetof(DMUS_IO_INSTRUMENT, nPitchBendRange)
188185

189-
static HRESULT parse_instrument(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *pChunk,
186+
static HRESULT parse_instrument(struct band *This, DMUS_PRIVATE_CHUNK *pChunk,
190187
IStream *pStm)
191188
{
192189
DMUS_PRIVATE_CHUNK Chunk;
@@ -293,7 +290,7 @@ static HRESULT parse_instrument(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *
293290
return S_OK;
294291
}
295292

296-
static HRESULT parse_instruments_list(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *pChunk,
293+
static HRESULT parse_instruments_list(struct band *This, DMUS_PRIVATE_CHUNK *pChunk,
297294
IStream *pStm)
298295
{
299296
HRESULT hr;
@@ -348,7 +345,7 @@ static HRESULT parse_instruments_list(IDirectMusicBandImpl *This, DMUS_PRIVATE_C
348345
return S_OK;
349346
}
350347

351-
static HRESULT parse_band_form(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *pChunk,
348+
static HRESULT parse_band_form(struct band *This, DMUS_PRIVATE_CHUNK *pChunk,
352349
IStream *pStm)
353350
{
354351
HRESULT hr = E_FAIL;
@@ -441,14 +438,14 @@ static HRESULT parse_band_form(IDirectMusicBandImpl *This, DMUS_PRIVATE_CHUNK *p
441438
return S_OK;
442439
}
443440

444-
static inline IDirectMusicBandImpl *impl_from_IPersistStream(IPersistStream *iface)
441+
static inline struct band *impl_from_IPersistStream(IPersistStream *iface)
445442
{
446-
return CONTAINING_RECORD(iface, IDirectMusicBandImpl, dmobj.IPersistStream_iface);
443+
return CONTAINING_RECORD(iface, struct band, dmobj.IPersistStream_iface);
447444
}
448445

449446
static HRESULT WINAPI band_persist_stream_Load(IPersistStream *iface, IStream *pStm)
450447
{
451-
IDirectMusicBandImpl *This = impl_from_IPersistStream(iface);
448+
struct band *This = impl_from_IPersistStream(iface);
452449
DMUS_PRIVATE_CHUNK Chunk;
453450
LARGE_INTEGER liMove;
454451
HRESULT hr;
@@ -503,7 +500,7 @@ static const IPersistStreamVtbl band_persist_stream_vtbl =
503500

504501
HRESULT create_dmband(REFIID lpcGUID, void **ppobj)
505502
{
506-
IDirectMusicBandImpl* obj;
503+
struct band* obj;
507504
HRESULT hr;
508505

509506
*ppobj = NULL;

dlls/dmband/bandtrack.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
/* IDirectMusicBandTrack Implementation
2-
*
1+
/*
32
* Copyright (C) 2003-2004 Rok Mandeljc
43
*
54
* This program is free software; you can redistribute it and/or

0 commit comments

Comments
 (0)