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 /Alc/effects/reverb.cpp | |
parent | f0cc34a60e65b7120a8d2d2bd5f76aebb3352685 (diff) |
Use proper inheritence for EffectStateFactory
Diffstat (limited to 'Alc/effects/reverb.cpp')
-rw-r--r-- | Alc/effects/reverb.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/Alc/effects/reverb.cpp b/Alc/effects/reverb.cpp index 702a8cdd..d486e8b4 100644 --- a/Alc/effects/reverb.cpp +++ b/Alc/effects/reverb.cpp @@ -1586,30 +1586,20 @@ static ALvoid ReverbState_process(ReverbState *State, ALsizei SamplesToDo, const struct ReverbStateFactory final : public EffectStateFactory { - ReverbStateFactory() noexcept; + ALeffectState *create() override; }; -static ALeffectState *ReverbStateFactory_create(ReverbStateFactory* UNUSED(factory)) +ALeffectState *ReverbStateFactory::create() { ReverbState *state; - NEW_OBJ0(state, ReverbState)(); - if(!state) return NULL; - - return STATIC_CAST(ALeffectState, state); -} - -DEFINE_EFFECTSTATEFACTORY_VTABLE(ReverbStateFactory); - -ReverbStateFactory::ReverbStateFactory() noexcept - : EffectStateFactory{GET_VTABLE2(ReverbStateFactory, EffectStateFactory)} -{ + return state; } EffectStateFactory *ReverbStateFactory_getFactory(void) { static ReverbStateFactory ReverbFactory{}; - return STATIC_CAST(EffectStateFactory, &ReverbFactory); + return &ReverbFactory; } |