diff options
author | Chris Robinson <[email protected]> | 2018-11-19 06:43:37 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-19 06:43:37 -0800 |
commit | c5c537cc5f5cb466cdf6679c9af9768301e32cc3 (patch) | |
tree | 6e9252e69132430c35e853132df5e42f5c1fae4d /OpenAL32/Include/alAuxEffectSlot.h | |
parent | f0cc34a60e65b7120a8d2d2bd5f76aebb3352685 (diff) |
Use proper inheritence for EffectStateFactory
Diffstat (limited to 'OpenAL32/Include/alAuxEffectSlot.h')
-rw-r--r-- | OpenAL32/Include/alAuxEffectSlot.h | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/OpenAL32/Include/alAuxEffectSlot.h b/OpenAL32/Include/alAuxEffectSlot.h index 815ae77e..d3d4e704 100644 --- a/OpenAL32/Include/alAuxEffectSlot.h +++ b/OpenAL32/Include/alAuxEffectSlot.h @@ -7,9 +7,6 @@ #include "almalloc.h" #include "atomic.h" -#ifdef __cplusplus -extern "C" { -#endif struct ALeffectStateVtable; struct ALeffectslot; @@ -59,23 +56,11 @@ static const struct ALeffectStateVtable T##_ALeffectState_vtable = { \ } -struct EffectStateFactoryVtable; - -typedef struct EffectStateFactory { - const struct EffectStateFactoryVtable *vtab; -} EffectStateFactory; +struct EffectStateFactory { + virtual ~EffectStateFactory() { } -struct EffectStateFactoryVtable { - ALeffectState *(*const create)(EffectStateFactory *factory); + virtual ALeffectState *create() = 0; }; -#define EffectStateFactory_create(x) ((x)->vtab->create((x))) - -#define DEFINE_EFFECTSTATEFACTORY_VTABLE(T) \ -DECLARE_THUNK(T, EffectStateFactory, ALeffectState*, create) \ - \ -static const struct EffectStateFactoryVtable T##_EffectStateFactory_vtable = { \ - T##_EffectStateFactory_create, \ -} #define MAX_EFFECT_CHANNELS (4) @@ -184,8 +169,4 @@ ALenum InitializeEffect(ALCcontext *Context, ALeffectslot *EffectSlot, ALeffect void ALeffectState_DecRef(ALeffectState *state); -#ifdef __cplusplus -} -#endif - #endif |