Skip to content
Permalink
Browse files

- Renamed AlignedAlloc.

according to Travis error logs these AlignedAlloc lines were causing compile errors, presumably AlignedAlloc was defined to aligned_alloc, so better use different names.
  • Loading branch information
coelckers committed Nov 24, 2019
1 parent bff22bb commit 354d5eb66ee3267249285346965e9415a50e6384
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/rendering/swrenderer/r_memory.cpp
@@ -75,7 +75,7 @@ void RenderMemory::Clear()
}
}

static void* AlignedAlloc(size_t alignment, size_t size)
static void* Aligned_Alloc(size_t alignment, size_t size)
{
void* ptr;
#if defined _MSC_VER
@@ -93,7 +93,7 @@ static void* AlignedAlloc(size_t alignment, size_t size)
return ptr;
}

static void AlignedFree(void* ptr)
static void Aligned_Free(void* ptr)
{
if (ptr)
{
@@ -105,11 +105,11 @@ static void AlignedFree(void* ptr)
}
}

RenderMemory::MemoryBlock::MemoryBlock() : Data(static_cast<uint8_t*>(AlignedAlloc(16, BlockSize))), Position(0)
RenderMemory::MemoryBlock::MemoryBlock() : Data(static_cast<uint8_t*>(Aligned_Alloc(16, BlockSize))), Position(0)
{
}

RenderMemory::MemoryBlock::~MemoryBlock()
{
AlignedFree(Data);
Aligned_Free(Data);
}

0 comments on commit 354d5eb

Please sign in to comment.
You can’t perform that action at this time.