diff options
author | Chris Robinson <[email protected]> | 2019-08-01 19:44:09 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2019-08-01 19:44:09 -0700 |
commit | 33bcced82a1e97811d4212195b6e6ca9cf2242b1 (patch) | |
tree | 9431019a2288668260e92cc1522ba686c04f6e0f /alc/alcontext.h | |
parent | 4917024c9485d5ed3362ddcb1a0d0f8ee45dfedc (diff) |
Use a smart pointer for holding the context's device
Diffstat (limited to 'alc/alcontext.h')
-rw-r--r-- | alc/alcontext.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/alc/alcontext.h b/alc/alcontext.h index ebb70a79..c4f23dfb 100644 --- a/alc/alcontext.h +++ b/alc/alcontext.h @@ -144,13 +144,13 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext> { /* Default effect slot */ std::unique_ptr<ALeffectslot> mDefaultSlot; - ALCdevice *const mDevice; + const al::intrusive_ptr<ALCdevice> mDevice; const ALCchar *mExtensionList{nullptr}; ALlistener mListener{}; - ALCcontext(ALCdevice *device); + ALCcontext(al::intrusive_ptr<ALCdevice> device); ALCcontext(const ALCcontext&) = delete; ALCcontext& operator=(const ALCcontext&) = delete; ~ALCcontext(); |