aboutsummaryrefslogtreecommitdiffstats
path: root/alc/backends/dsound.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/dsound.cpp
parent3d2e586636f765eb2fccebb757305295d7b2c954 (diff)
Make and use a bit_cast function
Instead of reinterpret_casting between incompatible types
Diffstat (limited to 'alc/backends/dsound.cpp')
-rw-r--r--alc/backends/dsound.cpp3
1 files changed, 2 insertions, 1 deletions
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 <algorithm>
#include <functional>
+#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<decltype(p##f)>(GetSymbol(ds_handle, #f)); \
+ p##f = al::bit_cast<decltype(p##f)>(GetSymbol(ds_handle, #f)); \
if(!p##f) \
{ \
CloseLib(ds_handle); \