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/dedicated.cpp | |
parent | f0cc34a60e65b7120a8d2d2bd5f76aebb3352685 (diff) |
Use proper inheritence for EffectStateFactory
Diffstat (limited to 'Alc/effects/dedicated.cpp')
-rw-r--r-- | Alc/effects/dedicated.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/Alc/effects/dedicated.cpp b/Alc/effects/dedicated.cpp index 705f7d41..59f31b52 100644 --- a/Alc/effects/dedicated.cpp +++ b/Alc/effects/dedicated.cpp @@ -115,30 +115,20 @@ static ALvoid ALdedicatedState_process(ALdedicatedState *state, ALsizei SamplesT struct DedicatedStateFactory final : public EffectStateFactory { - DedicatedStateFactory() noexcept; + ALeffectState *create() override; }; -ALeffectState *DedicatedStateFactory_create(DedicatedStateFactory *UNUSED(factory)) +ALeffectState *DedicatedStateFactory::create() { ALdedicatedState *state; - NEW_OBJ0(state, ALdedicatedState)(); - if(!state) return NULL; - - return STATIC_CAST(ALeffectState, state); -} - -DEFINE_EFFECTSTATEFACTORY_VTABLE(DedicatedStateFactory); - -DedicatedStateFactory::DedicatedStateFactory() noexcept - : EffectStateFactory{GET_VTABLE2(DedicatedStateFactory, EffectStateFactory)} -{ + return state; } EffectStateFactory *DedicatedStateFactory_getFactory(void) { static DedicatedStateFactory DedicatedFactory{}; - return STATIC_CAST(EffectStateFactory, &DedicatedFactory); + return &DedicatedFactory; } |