aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/effects/modulator.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 /Alc/effects/modulator.cpp
parentf0cc34a60e65b7120a8d2d2bd5f76aebb3352685 (diff)
Use proper inheritence for EffectStateFactory
Diffstat (limited to 'Alc/effects/modulator.cpp')
-rw-r--r--Alc/effects/modulator.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/Alc/effects/modulator.cpp b/Alc/effects/modulator.cpp
index 9790af79..e96859f7 100644
--- a/Alc/effects/modulator.cpp
+++ b/Alc/effects/modulator.cpp
@@ -197,29 +197,20 @@ static ALvoid ALmodulatorState_process(ALmodulatorState *state, ALsizei SamplesT
struct ModulatorStateFactory final : public EffectStateFactory {
- ModulatorStateFactory() noexcept;
+ ALeffectState *create() override;
};
-static ALeffectState *ModulatorStateFactory_create(ModulatorStateFactory *UNUSED(factory))
+ALeffectState *ModulatorStateFactory::create()
{
ALmodulatorState *state;
-
NEW_OBJ0(state, ALmodulatorState)();
- if(!state) return NULL;
-
- return STATIC_CAST(ALeffectState, state);
+ return state;
}
-DEFINE_EFFECTSTATEFACTORY_VTABLE(ModulatorStateFactory);
-
-ModulatorStateFactory::ModulatorStateFactory() noexcept
- : EffectStateFactory{GET_VTABLE2(ModulatorStateFactory, EffectStateFactory)}
-{ }
-
EffectStateFactory *ModulatorStateFactory_getFactory(void)
{
static ModulatorStateFactory ModulatorFactory{};
- return STATIC_CAST(EffectStateFactory, &ModulatorFactory);
+ return &ModulatorFactory;
}