diff --git a/Source/Shared/DeviceBase.h b/Source/Shared/DeviceBase.h index f2340c8..c3f1ade 100644 --- a/Source/Shared/DeviceBase.h +++ b/Source/Shared/DeviceBase.h @@ -41,10 +41,14 @@ struct DebugNameBaseVal { struct DeviceBase : public DebugNameBaseVal { inline DeviceBase(const CallbackInterface& callbacks, const AllocationCallbacks& allocationCallbacks, uint64_t signature = 0) - : m_Signature(signature) - , m_CallbackInterface(callbacks) + : m_CallbackInterface(callbacks) , m_AllocationCallbacks(allocationCallbacks) - , m_StdAllocator(m_AllocationCallbacks) { + , m_StdAllocator(m_AllocationCallbacks) +#ifndef NDEBUG + , m_Signature(signature) +#endif + { + MaybeUnused(signature); } inline StdAllocator& GetStdAllocator() { diff --git a/Source/Shared/SharedExternal.h b/Source/Shared/SharedExternal.h index 8fc5f99..7b72719 100644 --- a/Source/Shared/SharedExternal.h +++ b/Source/Shared/SharedExternal.h @@ -34,6 +34,10 @@ typedef uint32_t DXGI_FORMAT; #include "Lock.h" +template +constexpr void MaybeUnused([[maybe_unused]] const Args&... args) { +} + // Allocator typedef nri::AllocationCallbacks AllocationCallbacks; #include "StdAllocator.h" @@ -113,10 +117,6 @@ constexpr uint64_t MsToUs(uint32_t x) { constexpr void ReturnVoid() { } -template -constexpr void MaybeUnused([[maybe_unused]] const Args&... args) { -} - // Macro stuff #define NRI_INLINE inline // we want to inline all functions, which are actually wrappers for the interface functions