Minor fixes

This commit is contained in:
SirLynix 2024-01-02 11:50:04 +01:00
parent 7b30c0ac5c
commit 448cf66846
2 changed files with 3 additions and 5 deletions

View File

@ -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/Win32/ThreadImpl.hpp> #include <Nazara/Core/Win32/ThreadImpl.hpp>
#include <Nazara/Core/Format.hpp>
#include <Nazara/Core/StringExt.hpp> #include <Nazara/Core/StringExt.hpp>
#include <NazaraUtils/CallOnExit.hpp> #include <NazaraUtils/CallOnExit.hpp>
#include <Nazara/Core/Debug.hpp> #include <Nazara/Core/Debug.hpp>
@ -57,7 +58,7 @@ namespace Nz::PlatformImpl
HRESULT hr = GetThreadDescription(threadHandle, &namePtr); HRESULT hr = GetThreadDescription(threadHandle, &namePtr);
if (FAILED(hr)) if (FAILED(hr))
return "<GetThreadDescription failed: " + std::to_string(HRESULT_CODE(hr)) + ">"; return Format("<GetThreadDescription failed: {}>", HRESULT_CODE(hr));
CallOnExit freeName([&] { LocalFree(namePtr); }); CallOnExit freeName([&] { LocalFree(namePtr); });
@ -121,9 +122,6 @@ namespace Nz::PlatformImpl
#if NAZARAUTILS_WINDOWS_NT6 #if NAZARAUTILS_WINDOWS_NT6
else else
RaiseThreadNameException(::GetThreadId(threadHandle), threadName); RaiseThreadNameException(::GetThreadId(threadHandle), threadName);
#else
NazaraUnused(threadHandle);
NazaraUnused(threadName);
#endif #endif
#else #else

View File

@ -260,7 +260,7 @@ namespace Nz
const std::string& name = m_impl->joints[i].GetName(); const std::string& name = m_impl->joints[i].GetName();
if (!name.empty()) if (!name.empty())
{ {
NazaraAssertFmt(!m_impl->jointMap.contains(name), "Joint name \{0}\" is already present in joint map", name); NazaraAssertFmt(!m_impl->jointMap.contains(name), "joint name \"{0}\" is already present in joint map", name);
m_impl->jointMap.emplace(name, i); m_impl->jointMap.emplace(name, i);
} }
} }