diff options
author | Chris Robinson <[email protected]> | 2018-11-20 05:01:08 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-11-20 05:01:08 -0800 |
commit | 1df42c4a0f988c2736e9d2d2929d0f23ad2538be (patch) | |
tree | e036f53082ee4174a687130a98afebb0b7a5194f /Alc/alcontext.h | |
parent | 66fdd027d027058792d56da741a7660d8646c9df (diff) |
Use a unique_ptr for the default effect slot
Diffstat (limited to 'Alc/alcontext.h')
-rw-r--r-- | Alc/alcontext.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Alc/alcontext.h b/Alc/alcontext.h index 5eec2e96..f174f324 100644 --- a/Alc/alcontext.h +++ b/Alc/alcontext.h @@ -1,6 +1,7 @@ #ifndef ALCONTEXT_H #define ALCONTEXT_H +#include <memory> #include <thread> #include "AL/al.h" @@ -106,7 +107,7 @@ struct ALCcontext_struct { void *EventParam{nullptr}; /* Default effect slot */ - ALeffectslot *DefaultSlot{nullptr}; + std::unique_ptr<ALeffectslot> DefaultSlot; ALCdevice *const Device; const ALCchar *ExtensionList{nullptr}; @@ -116,7 +117,7 @@ struct ALCcontext_struct { ALlistener Listener{}; - ALCcontext_struct(ALCdevice *device) : Device{device} { } + ALCcontext_struct(ALCdevice *device); ALCcontext_struct(const ALCcontext_struct&) = delete; ALCcontext_struct& operator=(const ALCcontext_struct&) = delete; ~ALCcontext_struct(); |