Minor fixes

This commit is contained in:
SirLynix 2024-02-10 13:42:19 +01:00
parent e336c8a514
commit 57ad486c01
9 changed files with 16 additions and 9 deletions

View File

@ -21,11 +21,11 @@ namespace Nz
public: public:
Framebuffer() = default; Framebuffer() = default;
Framebuffer(const Framebuffer&) = delete; Framebuffer(const Framebuffer&) = delete;
Framebuffer(Framebuffer&&) = default; Framebuffer(Framebuffer&&) noexcept = default;
~Framebuffer() = default; ~Framebuffer() = default;
Framebuffer& operator=(const Framebuffer&) = delete; Framebuffer& operator=(const Framebuffer&) = delete;
Framebuffer& operator=(Framebuffer&&) = delete; Framebuffer& operator=(Framebuffer&&) noexcept = default;
private: private:
static inline VkResult CreateHelper(Device& device, const VkFramebufferCreateInfo* createInfo, const VkAllocationCallbacks* allocator, VkFramebuffer* handle); static inline VkResult CreateHelper(Device& device, const VkFramebufferCreateInfo* createInfo, const VkAllocationCallbacks* allocator, VkFramebuffer* handle);

View File

@ -47,7 +47,6 @@ namespace Nz
ImageButtonWidget* m_scrollNextButton; ImageButtonWidget* m_scrollNextButton;
ScrollbarButtonWidget* m_scrollCenterButton; ScrollbarButtonWidget* m_scrollCenterButton;
ScrollbarOrientation m_orientation; ScrollbarOrientation m_orientation;
bool m_isGrabbed;
float m_maximumValue; float m_maximumValue;
float m_minimumValue; float m_minimumValue;
float m_step; float m_step;

View File

@ -363,7 +363,7 @@ Nz::Result<std::shared_ptr<Nz::Animation>, Nz::ResourceLoadingError> LoadAnimati
} }
else else
{ {
sequenceJoints[jointIndex].position = Nz::TransformPositionTRS({}, Nz::Quaternionf::Identity(), parameters.jointScale, interpolatedPosition); sequenceJoints[jointIndex].position = parameters.jointScale * interpolatedPosition;
sequenceJoints[jointIndex].rotation = interpolatedRotation; sequenceJoints[jointIndex].rotation = interpolatedRotation;
sequenceJoints[jointIndex].scale = interpolatedScale; sequenceJoints[jointIndex].scale = interpolatedScale;
} }

View File

@ -32,9 +32,9 @@ namespace Nz
thread_local ErrorModeFlags s_flags; thread_local ErrorModeFlags s_flags;
thread_local std::string s_lastError = "no error"; thread_local std::string s_lastError = "no error";
thread_local std::string_view s_lastErrorFunction; thread_local std::string_view s_lastErrorFunction = {};
thread_local std::string_view s_lastErrorFile; thread_local std::string_view s_lastErrorFile = {};
thread_local unsigned int s_lastErrorLine = 0; thread_local constinit unsigned int s_lastErrorLine = 0;
} }
/*! /*!

View File

@ -29,6 +29,7 @@ namespace Nz::PlatformImpl
return std::string(&name[0]); return std::string(&name[0]);
#else #else
NazaraUnused(threadHandle)
return "<unsupported>"; return "<unsupported>";
#endif #endif
} }
@ -40,6 +41,7 @@ namespace Nz::PlatformImpl
#elif defined(__APPLE__) #elif defined(__APPLE__)
::pthread_setname_np(threadName); ::pthread_setname_np(threadName);
#else #else
NazaraUnused(threadName)
NazaraWarning("setting current thread name is not supported on this platform"); NazaraWarning("setting current thread name is not supported on this platform");
#endif #endif
} }
@ -49,8 +51,12 @@ namespace Nz::PlatformImpl
#if defined(__linux__) || defined(__FreeBSD__) #if defined(__linux__) || defined(__FreeBSD__)
::pthread_setname_np(threadHandle, threadName); ::pthread_setname_np(threadHandle, threadName);
#elif defined(__APPLE__) #elif defined(__APPLE__)
NazaraUnused(threadHandle)
NazaraUnused(threadName)
NazaraWarning("only current thread name can be set on MacOS X"); NazaraWarning("only current thread name can be set on MacOS X");
#else #else
NazaraUnused(threadHandle)
NazaraUnused(threadName)
NazaraWarning("setting a thread name is not supported on this platform"); NazaraWarning("setting a thread name is not supported on this platform");
#endif #endif
} }

View File

@ -101,6 +101,8 @@ NAZARA_WARNING_MSVC_DISABLE(6320 6322)
NAZARA_WARNING_POP() NAZARA_WARNING_POP()
#else #else
NazaraUnused(threadId)
NazaraUnused(threadName)
NazaraWarning("ThreadName exception is only supported with MSVC"); NazaraWarning("ThreadName exception is only supported with MSVC");
#endif #endif
} }

View File

@ -18,7 +18,7 @@
namespace Nz::GL namespace Nz::GL
{ {
thread_local const Context* s_currentGLContext = nullptr; thread_local constinit const Context* s_currentGLContext = nullptr;
namespace namespace
{ {

View File

@ -12,7 +12,6 @@ namespace Nz
ScrollbarWidget::ScrollbarWidget(BaseWidget* parent, ScrollbarOrientation orientation) : ScrollbarWidget::ScrollbarWidget(BaseWidget* parent, ScrollbarOrientation orientation) :
BaseWidget(parent), BaseWidget(parent),
m_orientation(orientation), m_orientation(orientation),
m_isGrabbed(false),
m_maximumValue(1.f), m_maximumValue(1.f),
m_minimumValue(0.f), m_minimumValue(0.f),
m_step(0.5f), m_step(0.5f),

View File

@ -282,6 +282,7 @@ add_requires(
-- Don't link with system-installed libs on CI -- Don't link with system-installed libs on CI
if os.getenv("CI") then if os.getenv("CI") then
add_requireconfs("*", { system = false }) add_requireconfs("*", { system = false })
add_requireconfs("freetype.*", { system = false })
end end
-- Module dependencies -- Module dependencies