From 6e0a0a2692a4303d6410c24bf83e09ca47ac6759 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 4 May 2023 09:16:59 -0700 Subject: Make and use a bit_cast function Instead of reinterpret_casting between incompatible types --- alc/backends/dsound.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'alc/backends/dsound.cpp') diff --git a/alc/backends/dsound.cpp b/alc/backends/dsound.cpp index 51dc36f6..8b967c95 100644 --- a/alc/backends/dsound.cpp +++ b/alc/backends/dsound.cpp @@ -44,6 +44,7 @@ #include #include +#include "albit.h" #include "alnumeric.h" #include "comptr.h" #include "core/device.h" @@ -778,7 +779,7 @@ bool DSoundBackendFactory::init() } #define LOAD_FUNC(f) do { \ - p##f = reinterpret_cast(GetSymbol(ds_handle, #f)); \ + p##f = al::bit_cast(GetSymbol(ds_handle, #f)); \ if(!p##f) \ { \ CloseLib(ds_handle); \ -- cgit v1.2.3