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/fshifter.cpp | |
parent | f0cc34a60e65b7120a8d2d2bd5f76aebb3352685 (diff) |
Use proper inheritence for EffectStateFactory
Diffstat (limited to 'Alc/effects/fshifter.cpp')
-rw-r--r-- | Alc/effects/fshifter.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/Alc/effects/fshifter.cpp b/Alc/effects/fshifter.cpp index f112c4c7..7775fafb 100644 --- a/Alc/effects/fshifter.cpp +++ b/Alc/effects/fshifter.cpp @@ -218,32 +218,23 @@ ALvoid ALfshifterState_process(ALfshifterState *state, ALsizei SamplesToDo, cons } // namespace struct FshifterStateFactory final : public EffectStateFactory { - FshifterStateFactory() noexcept; + ALeffectState *create() override; }; -static ALeffectState *FshifterStateFactory_create(FshifterStateFactory *UNUSED(factory)) +ALeffectState *FshifterStateFactory::create() { ALfshifterState *state; - NEW_OBJ0(state, ALfshifterState)(); - if(!state) return NULL; - - return STATIC_CAST(ALeffectState, state); -} - -DEFINE_EFFECTSTATEFACTORY_VTABLE(FshifterStateFactory); - -FshifterStateFactory::FshifterStateFactory() noexcept - : EffectStateFactory{GET_VTABLE2(FshifterStateFactory, EffectStateFactory)} -{ + return state; } EffectStateFactory *FshifterStateFactory_getFactory(void) { static FshifterStateFactory FshifterFactory{}; - return STATIC_CAST(EffectStateFactory, &FshifterFactory); + return &FshifterFactory; } + void ALfshifter_setParamf(ALeffect *effect, ALCcontext *context, ALenum param, ALfloat val) { ALeffectProps *props = &effect->Props; |