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/alconfig.cpp | |
parent | 3d2e586636f765eb2fccebb757305295d7b2c954 (diff) |
Make and use a bit_cast function
Instead of reinterpret_casting between incompatible types
Diffstat (limited to 'alc/alconfig.cpp')
-rw-r--r-- | alc/alconfig.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/alc/alconfig.cpp b/alc/alconfig.cpp index 56cad9e0..ceb7d97b 100644 --- a/alc/alconfig.cpp +++ b/alc/alconfig.cpp @@ -38,6 +38,7 @@ #include <string> #include <utility> +#include "albit.h" #include "alfstream.h" #include "alstring.h" #include "core/helpers.h" @@ -418,7 +419,7 @@ void ReadALConfig() if((configURL=CFBundleCopyResourceURL(mainBundle, CFSTR(".alsoftrc"), CFSTR(""), nullptr)) && CFURLGetFileSystemRepresentation(configURL, true, fileName, sizeof(fileName))) { - f = al::ifstream{reinterpret_cast<char*>(fileName)}; + f = al::ifstream{al::bit_cast<char*>(fileName)}; if(f.is_open()) LoadConfigFromFile(f); } |