aboutsummaryrefslogtreecommitdiffstats
path: root/al/auxeffectslot.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-03-05 18:49:46 -0800
committerChris Robinson <[email protected]>2022-03-05 18:49:46 -0800
commitbe3b37b7c91b55f14a69f0fc209bbda1837c20d7 (patch)
tree6a79e42a654f13ac7bcef64120810e21add94a8e /al/auxeffectslot.h
parent776d62c1d1e6956eff63ebd1ef22c287ecce89bd (diff)
Avoid a stateful unique_ptr deleter
Diffstat (limited to 'al/auxeffectslot.h')
-rw-r--r--al/auxeffectslot.h23
1 files changed, 7 insertions, 16 deletions
diff --git a/al/auxeffectslot.h b/al/auxeffectslot.h
index 94a61cfc..2c99f330 100644
--- a/al/auxeffectslot.h
+++ b/al/auxeffectslot.h
@@ -249,29 +249,20 @@ private:
// `alAuxiliaryEffectSlotf(effect_slot, AL_EFFECTSLOT_GAIN, gain)`
void eax_set_effect_slot_gain(ALfloat gain);
+
+public:
+ class EaxDeleter {
+ public:
+ void operator()(ALeffectslot *effect_slot);
+ }; // EaxAlEffectSlotDeleter
#endif // ALSOFT_EAX
};
void UpdateAllEffectSlotProps(ALCcontext *context);
#ifdef ALSOFT_EAX
-class EaxAlEffectSlotDeleter
-{
-public:
- EaxAlEffectSlotDeleter() noexcept = default;
-
- EaxAlEffectSlotDeleter(
- ALCcontext& context) noexcept;
-
- void operator()(
- ALeffectslot* effect_slot);
-
-
-private:
- ALCcontext* context_{};
-}; // EaxAlEffectSlotDeleter
-using EaxAlEffectSlotUPtr = std::unique_ptr<ALeffectslot, EaxAlEffectSlotDeleter>;
+using EaxAlEffectSlotUPtr = std::unique_ptr<ALeffectslot, ALeffectslot::EaxDeleter>;
EaxAlEffectSlotUPtr eax_create_al_effect_slot(