diff options
Diffstat (limited to 'Alc/effects/null.cpp')
-rw-r--r-- | Alc/effects/null.cpp | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/Alc/effects/null.cpp b/Alc/effects/null.cpp index 0d85d505..f5641e20 100644 --- a/Alc/effects/null.cpp +++ b/Alc/effects/null.cpp @@ -89,33 +89,21 @@ static void ALnullState_Delete(void *ptr) struct NullStateFactory final : public EffectStateFactory { - NullStateFactory() noexcept; + ALeffectState *create() override; }; /* Creates ALeffectState objects of the appropriate type. */ -ALeffectState *NullStateFactory_create(NullStateFactory *UNUSED(factory)) +ALeffectState *NullStateFactory::create() { ALnullState *state; - NEW_OBJ0(state, ALnullState)(); - if(!state) return NULL; - - return STATIC_CAST(ALeffectState, state); + return state; } -/* Define the EffectStateFactory vtable for this type. */ -DEFINE_EFFECTSTATEFACTORY_VTABLE(NullStateFactory); - -NullStateFactory::NullStateFactory() noexcept - : EffectStateFactory{GET_VTABLE2(NullStateFactory, EffectStateFactory)} -{ -} - - EffectStateFactory *NullStateFactory_getFactory(void) { static NullStateFactory NullFactory{}; - return STATIC_CAST(EffectStateFactory, &NullFactory); + return &NullFactory; } |