Skip to content

Commit

Permalink
Fixed Release build
Browse files Browse the repository at this point in the history
dzhdanNV committed Jan 23, 2025
1 parent 33fd660 commit 46255b4
Showing 2 changed files with 11 additions and 7 deletions.
10 changes: 7 additions & 3 deletions Source/Shared/DeviceBase.h
Original file line number Diff line number Diff line change
@@ -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<uint8_t>& GetStdAllocator() {
8 changes: 4 additions & 4 deletions Source/Shared/SharedExternal.h
Original file line number Diff line number Diff line change
@@ -34,6 +34,10 @@ typedef uint32_t DXGI_FORMAT;

#include "Lock.h"

template <typename... Args>
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 <typename... Args>
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

0 comments on commit 46255b4

Please sign in to comment.