diff --git a/src/Nazara/Core/Posix/DynLibImpl.cpp b/src/Nazara/Core/Posix/DynLibImpl.cpp index 0d4b6ff3e..32d257a70 100644 --- a/src/Nazara/Core/Posix/DynLibImpl.cpp +++ b/src/Nazara/Core/Posix/DynLibImpl.cpp @@ -5,7 +5,6 @@ #include #include #include -#include #include #include @@ -25,15 +24,13 @@ namespace Nz if (!ptr) *errorMessage = dlerror(); - static_assert(sizeof(DynLibFunc) == sizeof(void*)); - - return std::bit_cast(ptr); + return BitCast(ptr); } bool DynLibImpl::Load(const std::filesystem::path& libraryPath, std::string* errorMessage) { dlerror(); // Clear error flag - m_handle = dlopen(Nz::PathToString(libraryPath).data(), RTLD_LAZY | RTLD_GLOBAL); + m_handle = dlopen(PathToString(libraryPath).data(), RTLD_LAZY | RTLD_GLOBAL); if (!m_handle) {