From 6e0a0a2692a4303d6410c24bf83e09ca47ac6759 Mon Sep 17 00:00:00 2001
From: Chris Robinson <chris.kcat@gmail.com>
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/alsa.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'alc/backends/alsa.cpp')

diff --git a/alc/backends/alsa.cpp b/alc/backends/alsa.cpp
index 01021868..b162f84e 100644
--- a/alc/backends/alsa.cpp
+++ b/alc/backends/alsa.cpp
@@ -35,6 +35,7 @@
 #include <thread>
 #include <utility>
 
+#include "albit.h"
 #include "albyte.h"
 #include "alc/alconfig.h"
 #include "almalloc.h"
@@ -1204,7 +1205,7 @@ bool AlsaBackendFactory::init()
 
         error = false;
 #define LOAD_FUNC(f) do {                                                     \
-    p##f = reinterpret_cast<decltype(p##f)>(GetSymbol(alsa_handle, #f));      \
+    p##f = al::bit_cast<decltype(p##f)>(GetSymbol(alsa_handle, #f));          \
     if(p##f == nullptr) {                                                     \
         error = true;                                                         \
         missing_funcs += "\n" #f;                                             \
-- 
cgit v1.2.3