aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alAuxEffectSlot.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-19 06:43:37 -0800
committerChris Robinson <[email protected]>2018-11-19 06:43:37 -0800
commitc5c537cc5f5cb466cdf6679c9af9768301e32cc3 (patch)
tree6e9252e69132430c35e853132df5e42f5c1fae4d /OpenAL32/alAuxEffectSlot.cpp
parentf0cc34a60e65b7120a8d2d2bd5f76aebb3352685 (diff)
Use proper inheritence for EffectStateFactory
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.cpp')
-rw-r--r--OpenAL32/alAuxEffectSlot.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/OpenAL32/alAuxEffectSlot.cpp b/OpenAL32/alAuxEffectSlot.cpp
index ff0f7eaa..4e25d3ee 100644
--- a/OpenAL32/alAuxEffectSlot.cpp
+++ b/OpenAL32/alAuxEffectSlot.cpp
@@ -487,15 +487,13 @@ ALenum InitializeEffect(ALCcontext *Context, ALeffectslot *EffectSlot, ALeffect
if(newtype != EffectSlot->Effect.Type)
{
- EffectStateFactory *factory;
-
- factory = getFactoryByType(newtype);
+ EffectStateFactory *factory = getFactoryByType(newtype);
if(!factory)
{
ERR("Failed to find factory for effect type 0x%04x\n", newtype);
return AL_INVALID_ENUM;
}
- State = EffectStateFactory_create(factory);
+ State = factory->create();
if(!State) return AL_OUT_OF_MEMORY;
START_MIXER_MODE();
@@ -663,7 +661,7 @@ static void RemoveActiveEffectSlots(const ALuint *slotids, ALsizei count, ALCcon
ALenum InitEffectSlot(ALeffectslot *slot)
{
EffectStateFactory *factory{getFactoryByType(slot->Effect.Type)};
- slot->Effect.State = EffectStateFactory_create(factory);
+ slot->Effect.State = factory->create();
if(!slot->Effect.State) return AL_OUT_OF_MEMORY;
ALeffectState_IncRef(slot->Effect.State);