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/pulseaudio.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'alc/backends/pulseaudio.cpp') diff --git a/alc/backends/pulseaudio.cpp b/alc/backends/pulseaudio.cpp index 6f706c7f..6e8bfe1b 100644 --- a/alc/backends/pulseaudio.cpp +++ b/alc/backends/pulseaudio.cpp @@ -38,6 +38,7 @@ #include #include +#include "albit.h" #include "albyte.h" #include "alc/alconfig.h" #include "almalloc.h" @@ -1381,7 +1382,7 @@ bool PulseBackendFactory::init() } #define LOAD_FUNC(x) do { \ - p##x = reinterpret_cast(GetSymbol(pulse_handle, #x)); \ + p##x = al::bit_cast(GetSymbol(pulse_handle, #x)); \ if(!(p##x)) { \ ret = false; \ missing_funcs += "\n" #x; \ -- cgit v1.2.3