diff options
author | Chris Robinson <[email protected]> | 2023-05-04 09:16:59 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-05-04 09:27:19 -0700 |
commit | 6e0a0a2692a4303d6410c24bf83e09ca47ac6759 (patch) | |
tree | 906db65a3900d89b07a67d8b938ecc5977dcb9bb /alc/backends/portaudio.cpp | |
parent | 3d2e586636f765eb2fccebb757305295d7b2c954 (diff) |
Make and use a bit_cast function
Instead of reinterpret_casting between incompatible types
Diffstat (limited to 'alc/backends/portaudio.cpp')
-rw-r--r-- | alc/backends/portaudio.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/alc/backends/portaudio.cpp b/alc/backends/portaudio.cpp index 9c94587d..d652d4cd 100644 --- a/alc/backends/portaudio.cpp +++ b/alc/backends/portaudio.cpp @@ -26,6 +26,7 @@ #include <cstdlib> #include <cstring> +#include "albit.h" #include "alc/alconfig.h" #include "alnumeric.h" #include "core/device.h" @@ -376,7 +377,7 @@ bool PortBackendFactory::init() return false; #define LOAD_FUNC(f) do { \ - p##f = reinterpret_cast<decltype(p##f)>(GetSymbol(pa_handle, #f)); \ + p##f = al::bit_cast<decltype(p##f)>(GetSymbol(pa_handle, #f)); \ if(p##f == nullptr) \ { \ CloseLib(pa_handle); \ |