Switch Nazara to C++20

This commit is contained in:
Lynix
2023-11-14 14:24:28 +01:00
parent 35b4da0d4b
commit e5789d1749
17 changed files with 51 additions and 57 deletions

View File

@@ -30,7 +30,7 @@ namespace Nz
if constexpr (std::is_same_v<std::filesystem::path::value_type, wchar_t>)
m_handle = LoadLibraryExW(libraryPath.c_str(), nullptr, (libraryPath.is_absolute()) ? LOAD_WITH_ALTERED_SEARCH_PATH : 0);
else
m_handle = LoadLibraryExW(ToWideString(libraryPath.generic_u8string()).data(), nullptr, (libraryPath.is_absolute()) ? LOAD_WITH_ALTERED_SEARCH_PATH : 0);
m_handle = LoadLibraryExW(ToWideString(PathToString(libraryPath)).data(), nullptr, (libraryPath.is_absolute()) ? LOAD_WITH_ALTERED_SEARCH_PATH : 0);
if (m_handle)
return true;

View File

@@ -92,7 +92,7 @@ namespace Nz
if constexpr (std::is_same_v<std::filesystem::path::value_type, wchar_t>)
m_handle = CreateFileW(filePath.c_str(), access, shareMode, nullptr, openMode, 0, nullptr);
else
m_handle = CreateFileW(ToWideString(filePath.generic_u8string()).data(), access, shareMode, nullptr, openMode, 0, nullptr);
m_handle = CreateFileW(ToWideString(PathToString(filePath)).data(), access, shareMode, nullptr, openMode, 0, nullptr);
return m_handle != INVALID_HANDLE_VALUE;
}