From 4782d6107d250e3528c5e567dca48da727584ee7 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 27 Dec 2018 13:40:43 -0800 Subject: Use a proper constructor/destructor for the ALCbackend base --- Alc/backends/wave.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Alc/backends/wave.cpp') 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 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(); } -- cgit v1.2.3