Skip to content

Commit

Permalink
Restores use of original macro names
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-langholtz committed Dec 22, 2023
1 parent 4ff5547 commit 47dbf47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/source/playrho/BlockAllocator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void* BlockAllocator::Allocate(size_type n)

const auto chunk = m_chunks + m_chunkCount;
chunk->blocks = static_cast<Block*>(Alloc(ChunkSize));
#ifndef NDEBUG
#ifdef _DEBUG
static constexpr auto allocatedValue = 0xcd;
std::memset(chunk->blocks, allocatedValue, ChunkSize);
#endif
Expand Down Expand Up @@ -185,7 +185,7 @@ void BlockAllocator::Free(void* p, size_type n)
if (n > 0) {
const auto index = GetBlockSizeIndex(n);
assert((0 <= index) && (index < std::size(m_freeLists)));
#ifndef NDEBUG
#ifdef _DEBUG
// Verify the memory address and size is valid.
assert((0 <= index) && (index < std::size(AllocatorBlockSizes)));
const auto blockSize = AllocatorBlockSizes[index];
Expand Down

0 comments on commit 47dbf47

Please sign in to comment.