From 6571d805400f018b51835a8e37752409af9b1c4d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sat, 25 May 2013 21:04:00 -0700 Subject: Use a Delete method for deletable objects --- Alc/effects/flanger.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'Alc/effects/flanger.c') diff --git a/Alc/effects/flanger.c b/Alc/effects/flanger.c index de98a06d..12e16de2 100644 --- a/Alc/effects/flanger.c +++ b/Alc/effects/flanger.c @@ -243,9 +243,9 @@ static ALvoid ALflangerState_Process(ALflangerState *state, ALuint SamplesToDo, ProcessSinusoid(state, SamplesToDo, SamplesIn, SamplesOut); } -static ALeffectStateFactory *ALflangerState_getCreator(void) +static void ALflangerState_Delete(ALflangerState *state) { - return STATIC_CAST(ALeffectStateFactory, &FlangerFactory); + free(state); } DEFINE_ALEFFECTSTATE_VTABLE(ALflangerState); @@ -267,13 +267,6 @@ ALeffectState *ALflangerStateFactory_create(void) return STATIC_CAST(ALeffectState, state); } -static ALvoid ALflangerStateFactory_destroy(ALeffectState *effect) -{ - ALflangerState *state = STATIC_UPCAST(ALflangerState, ALeffectState, effect); - ALflangerState_Destruct(state); - free(state); -} - DEFINE_ALEFFECTSTATEFACTORY_VTABLE(ALflangerStateFactory); -- cgit v1.2.3