aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends/loopback.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-12-27 13:40:43 -0800
committerChris Robinson <[email protected]>2018-12-27 13:40:43 -0800
commit4782d6107d250e3528c5e567dca48da727584ee7 (patch)
tree05679c4196c4dacfce65991fa4caa7862cf1c381 /Alc/backends/loopback.cpp
parent7880f27054cd69cd1e36ebd3d20aa9d6148e3bbd (diff)
Use a proper constructor/destructor for the ALCbackend base
Diffstat (limited to 'Alc/backends/loopback.cpp')
-rw-r--r--Alc/backends/loopback.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/Alc/backends/loopback.cpp b/Alc/backends/loopback.cpp
index 65c87971..9291ae77 100644
--- a/Alc/backends/loopback.cpp
+++ b/Alc/backends/loopback.cpp
@@ -29,6 +29,7 @@
namespace {
struct ALCloopback final : public ALCbackend {
+ ALCloopback(ALCdevice *device) noexcept : ALCbackend{device} { }
};
void ALCloopback_Construct(ALCloopback *self, ALCdevice *device);
@@ -48,14 +49,12 @@ DEFINE_ALCBACKEND_VTABLE(ALCloopback);
void ALCloopback_Construct(ALCloopback *self, ALCdevice *device)
{
- new (self) ALCloopback{};
- ALCbackend_Construct(STATIC_CAST(ALCbackend, self), device);
+ new (self) ALCloopback{device};
SET_VTABLE2(ALCloopback, ALCbackend, self);
}
void ALCloopback_Destruct(ALCloopback *self)
{
- ALCbackend_Destruct(STATIC_CAST(ALCbackend, self));
self->~ALCloopback();
}