diff options
author | Chris Robinson <[email protected]> | 2018-12-27 13:40:43 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-12-27 13:40:43 -0800 |
commit | 4782d6107d250e3528c5e567dca48da727584ee7 (patch) | |
tree | 05679c4196c4dacfce65991fa4caa7862cf1c381 /Alc/backends/wave.cpp | |
parent | 7880f27054cd69cd1e36ebd3d20aa9d6148e3bbd (diff) |
Use a proper constructor/destructor for the ALCbackend base
Diffstat (limited to 'Alc/backends/wave.cpp')
-rw-r--r-- | Alc/backends/wave.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/backends/wave.cpp b/Alc/backends/wave.cpp index d40e93f0..3a65fc64 100644 --- a/Alc/backends/wave.cpp +++ b/Alc/backends/wave.cpp @@ -86,6 +86,8 @@ struct ALCwaveBackend final : public ALCbackend { std::atomic<ALenum> mKillNow{AL_TRUE}; std::thread mThread; + + ALCwaveBackend(ALCdevice *device) noexcept : ALCbackend{device} { } }; int ALCwaveBackend_mixerProc(ALCwaveBackend *self); @@ -108,8 +110,7 @@ DEFINE_ALCBACKEND_VTABLE(ALCwaveBackend); void ALCwaveBackend_Construct(ALCwaveBackend *self, ALCdevice *device) { - new (self) ALCwaveBackend{}; - ALCbackend_Construct(STATIC_CAST(ALCbackend, self), device); + new (self) ALCwaveBackend{device}; SET_VTABLE2(ALCwaveBackend, ALCbackend, self); } @@ -119,7 +120,6 @@ void ALCwaveBackend_Destruct(ALCwaveBackend *self) fclose(self->mFile); self->mFile = nullptr; - ALCbackend_Destruct(STATIC_CAST(ALCbackend, self)); self->~ALCwaveBackend(); } |