diff options
author | Chris Robinson <[email protected]> | 2018-12-29 02:16:16 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-29 02:16:16 -0800 |
commit | 71a4d6db6f88cbb735cd959b3dd16d83a27474cf (patch) | |
tree | 4aff47e22dc5c8486c7229e23848edb34cc11ada /Alc/backends/base.h | |
parent | 3c637d5fd70e7bdb5dfc79c515359cba3eb0c9af (diff) |
Return a unique_ptr for the backend
Diffstat (limited to 'Alc/backends/base.h')
-rw-r--r-- | Alc/backends/base.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Alc/backends/base.h b/Alc/backends/base.h index 0fc7de38..0b9803a2 100644 --- a/Alc/backends/base.h +++ b/Alc/backends/base.h @@ -1,6 +1,7 @@ #ifndef ALC_BACKENDS_BASE_H #define ALC_BACKENDS_BASE_H +#include <memory> #include <chrono> #include <string> #include <mutex> @@ -53,7 +54,7 @@ struct BackendBase { BackendBase(ALCdevice *device) noexcept; virtual ~BackendBase(); }; - +using BackendPtr = std::unique_ptr<BackendBase>; enum class BackendType { Playback, @@ -70,7 +71,7 @@ struct BackendFactory { virtual void probe(DevProbe type, std::string *outnames) = 0; - virtual BackendBase *createBackend(ALCdevice *device, BackendType type) = 0; + virtual BackendPtr createBackend(ALCdevice *device, BackendType type) = 0; }; #endif /* ALC_BACKENDS_BASE_H */ |