diff options
author | Chris Robinson <[email protected]> | 2013-05-27 13:16:17 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-05-27 13:16:17 -0700 |
commit | 334a7c1d59961277263a7a69575325aeef0987ee (patch) | |
tree | f96e8536a0e1a1e5e099ee00ffc76f51f0d4532d /OpenAL32/Include/alAuxEffectSlot.h | |
parent | 8d874512b6a1520dc9fbbe6322495e9e2da9dc3c (diff) |
Cleanup the ALeffectStateFactory_create methods
Get rid of the ALeffectStateFactory_create macro, and use the VCALL_NOARGS
helper (requires adding the 'this' factory parameter).
Diffstat (limited to 'OpenAL32/Include/alAuxEffectSlot.h')
-rw-r--r-- | OpenAL32/Include/alAuxEffectSlot.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h index d496df8d..60724654 100644 --- a/OpenAL32/Include/alAuxEffectSlot.h +++ b/OpenAL32/Include/alAuxEffectSlot.h @@ -48,18 +48,16 @@ static const struct ALeffectStateVtable T##_ALeffectState_vtable = { \ struct ALeffectStateFactoryVtable { - ALeffectState *(*const create)(void); + ALeffectState *(*const create)(ALeffectStateFactory *factory); }; struct ALeffectStateFactory { const struct ALeffectStateFactoryVtable *vtbl; }; -#define ALeffectStateFactory_create(p) ((p)->vtbl->create()) - #define DEFINE_ALEFFECTSTATEFACTORY_VTABLE(T) \ -static ALeffectState* T##_ALeffectStateFactory_create(void) \ -{ return T##_create(); } \ +static ALeffectState* T##_ALeffectStateFactory_create(ALeffectStateFactory *factory) \ +{ return T##_create(STATIC_UPCAST(T, ALeffectStateFactory, factory)); } \ \ static const struct ALeffectStateFactoryVtable T##_ALeffectStateFactory_vtable = { \ T##_ALeffectStateFactory_create, \ |