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/compressor.cpp | |
parent | f0cc34a60e65b7120a8d2d2bd5f76aebb3352685 (diff) |
Use proper inheritence for EffectStateFactory
Diffstat (limited to 'Alc/effects/compressor.cpp')
-rw-r--r-- | Alc/effects/compressor.cpp | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/Alc/effects/compressor.cpp b/Alc/effects/compressor.cpp index 464e98ec..cd6c72db 100644 --- a/Alc/effects/compressor.cpp +++ b/Alc/effects/compressor.cpp @@ -177,30 +177,20 @@ static ALvoid ALcompressorState_process(ALcompressorState *state, ALsizei Sample struct CompressorStateFactory final : public EffectStateFactory { - CompressorStateFactory() noexcept; + ALeffectState *create() override; }; -static ALeffectState *CompressorStateFactory_create(CompressorStateFactory *UNUSED(factory)) +ALeffectState *CompressorStateFactory::create() { ALcompressorState *state; - NEW_OBJ0(state, ALcompressorState)(); - if(!state) return NULL; - - return STATIC_CAST(ALeffectState, state); -} - -DEFINE_EFFECTSTATEFACTORY_VTABLE(CompressorStateFactory); - -CompressorStateFactory::CompressorStateFactory() noexcept - : EffectStateFactory{GET_VTABLE2(CompressorStateFactory, EffectStateFactory)} -{ + return state; } EffectStateFactory *CompressorStateFactory_getFactory(void) { static CompressorStateFactory CompressorFactory{}; - return STATIC_CAST(EffectStateFactory, &CompressorFactory); + return &CompressorFactory; } |