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:
Framebuffer() = default;
Framebuffer(const Framebuffer&) = delete;
Framebuffer(Framebuffer&&) = default;
Framebuffer(Framebuffer&&) noexcept = default;
~Framebuffer() = default;
Framebuffer& operator=(const Framebuffer&) = delete;
Framebuffer& operator=(Framebuffer&&) = delete;
Framebuffer& operator=(Framebuffer&&) noexcept = default;
private:
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;
ScrollbarButtonWidget* m_scrollCenterButton;
ScrollbarOrientation m_orientation;
bool m_isGrabbed;
float m_maximumValue;
float m_minimumValue;
float m_step;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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