aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/pulseaudio.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-05-04 09:16:59 -0700
committerChris Robinson <[email protected]>2023-05-04 09:27:19 -0700
commit6e0a0a2692a4303d6410c24bf83e09ca47ac6759 (patch)
tree906db65a3900d89b07a67d8b938ecc5977dcb9bb /alc/backends/pulseaudio.cpp
parent3d2e586636f765eb2fccebb757305295d7b2c954 (diff)
Make and use a bit_cast function
Instead of reinterpret_casting between incompatible types
Diffstat (limited to 'alc/backends/pulseaudio.cpp')
-rw-r--r--alc/backends/pulseaudio.cpp3
1 files changed, 2 insertions, 1 deletions
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 <sys/types.h>
#include <utility>
+#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<decltype(p##x)>(GetSymbol(pulse_handle, #x)); \
+ p##x = al::bit_cast<decltype(p##x)>(GetSymbol(pulse_handle, #x)); \
if(!(p##x)) { \
ret = false; \
missing_funcs += "\n" #x; \