C++20 fixes
This commit is contained in:
parent
e5789d1749
commit
a4b10749f7
|
|
@ -124,7 +124,7 @@ int main()
|
||||||
|
|
||||||
for (auto&& headerFile : std::filesystem::recursive_directory_iterator(entry.path()))
|
for (auto&& headerFile : std::filesystem::recursive_directory_iterator(entry.path()))
|
||||||
{
|
{
|
||||||
if (!headerFile.is_regular_file() || headerFile.path().extension().generic_u8string() != ".hpp")
|
if (!headerFile.is_regular_file() || Nz::PathToString(headerFile.path().extension()) != ".hpp")
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
std::string filepath = Nz::PathToString(headerFile.path());
|
std::string filepath = Nz::PathToString(headerFile.path());
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ int main()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const std::filesystem::path& filePath = p.path();
|
const std::filesystem::path& filePath = p.path();
|
||||||
if (Nz::MeshLoader::IsExtensionSupported(filePath.extension().generic_u8string())) // L'extension est-elle supportée par le MeshLoader ?
|
if (Nz::MeshLoader::IsExtensionSupported(Nz::PathToString(filePath.extension()))) // L'extension est-elle supportée par le MeshLoader ?
|
||||||
models.push_back(filePath);
|
models.push_back(filePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||||
|
|
||||||
#include <Nazara/Core/Posix/DynLibImpl.hpp>
|
#include <Nazara/Core/Posix/DynLibImpl.hpp>
|
||||||
|
#include <NazaraUtils/Algorithm.hpp>
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <Nazara/Core/Debug.hpp>
|
#include <Nazara/Core/Debug.hpp>
|
||||||
|
|
@ -35,7 +36,7 @@ namespace Nz
|
||||||
bool DynLibImpl::Load(const std::filesystem::path& libraryPath, std::string* errorMessage)
|
bool DynLibImpl::Load(const std::filesystem::path& libraryPath, std::string* errorMessage)
|
||||||
{
|
{
|
||||||
dlerror(); // Clear error flag
|
dlerror(); // Clear error flag
|
||||||
m_handle = dlopen(libraryPath.generic_u8string().data(), RTLD_LAZY | RTLD_GLOBAL);
|
m_handle = dlopen(Nz::PathToString(libraryPath).data(), RTLD_LAZY | RTLD_GLOBAL);
|
||||||
|
|
||||||
if (!m_handle)
|
if (!m_handle)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||||
|
|
||||||
#include <Nazara/Core/Posix/FileImpl.hpp>
|
#include <Nazara/Core/Posix/FileImpl.hpp>
|
||||||
|
#include <NazaraUtils/Algorithm.hpp>
|
||||||
#include <Nazara/Core/Algorithm.hpp>
|
#include <Nazara/Core/Algorithm.hpp>
|
||||||
#include <Nazara/Core/Error.hpp>
|
#include <Nazara/Core/Error.hpp>
|
||||||
#include <Nazara/Core/StringExt.hpp>
|
#include <Nazara/Core/StringExt.hpp>
|
||||||
|
|
@ -78,7 +79,7 @@ namespace Nz
|
||||||
if (mode & OpenMode::Truncate)
|
if (mode & OpenMode::Truncate)
|
||||||
flags |= O_TRUNC;
|
flags |= O_TRUNC;
|
||||||
|
|
||||||
int fileDescriptor = Open_def(filePath.generic_u8string().data(), flags, permissions);
|
int fileDescriptor = Open_def(Nz::PathToString(filePath).data(), flags, permissions);
|
||||||
if (fileDescriptor == -1)
|
if (fileDescriptor == -1)
|
||||||
{
|
{
|
||||||
NazaraErrorFmt("failed to open \"{0}\": {1}", filePath, Error::GetLastSystemError());
|
NazaraErrorFmt("failed to open \"{0}\": {1}", filePath, Error::GetLastSystemError());
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ SCENARIO("EulerAngles", "[MATH][EULERANGLES]")
|
||||||
THEN("They are the same")
|
THEN("They are the same")
|
||||||
{
|
{
|
||||||
CHECK(firstZero.ToQuaternion() == secondZero.ToQuaternion());
|
CHECK(firstZero.ToQuaternion() == secondZero.ToQuaternion());
|
||||||
CHECK(firstZero.ToQuaternion() == Nz::EulerAnglesf(Nz::Quaternionf(1.f, 0.f, 0.f, 0.f)));
|
CHECK(firstZero.ToQuaternion() == Nz::Quaternionf(1.f, 0.f, 0.f, 0.f));
|
||||||
CHECK(secondZero.ToQuaternion() == Nz::EulerAnglesf(Nz::Quaternionf(1.f, 0.f, 0.f, 0.f)));
|
CHECK(secondZero.ToQuaternion() == Nz::Quaternionf(1.f, 0.f, 0.f, 0.f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue