diff options
author | Chris Robinson <[email protected]> | 2020-12-28 08:04:23 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2020-12-28 08:04:23 -0800 |
commit | aae115c35a2b1899cfcaf443aa9a6da9b7647258 (patch) | |
tree | 66c551b2523c69ff1206978467d3887c803054ea /alc/effects/chorus.cpp | |
parent | 15e05fcef882e3d50104db39d38019165c7995f9 (diff) |
Return an intrusive_ptr from EffectStateFactory::create
Diffstat (limited to 'alc/effects/chorus.cpp')
-rw-r--r-- | alc/effects/chorus.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/alc/effects/chorus.cpp b/alc/effects/chorus.cpp index 091f6b40..92d57c18 100644 --- a/alc/effects/chorus.cpp +++ b/alc/effects/chorus.cpp @@ -259,7 +259,8 @@ void ChorusState::process(const size_t samplesToDo, const al::span<const FloatBu struct ChorusStateFactory final : public EffectStateFactory { - EffectState *create() override { return new ChorusState{}; } + al::intrusive_ptr<EffectState> create() override + { return al::intrusive_ptr<EffectState>{new ChorusState{}}; } }; @@ -267,7 +268,8 @@ struct ChorusStateFactory final : public EffectStateFactory { * the same processing functions, so piggyback flanger on the chorus functions. */ struct FlangerStateFactory final : public EffectStateFactory { - EffectState *create() override { return new ChorusState{}; } + al::intrusive_ptr<EffectState> create() override + { return al::intrusive_ptr<EffectState>{new ChorusState{}}; } }; } // namespace |