Skip to content

Commit

Permalink
- Renamed AlignedAlloc.
Browse files Browse the repository at this point in the history
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 354d5eb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rendering/swrenderer/r_memory.cpp
Expand Up @@ -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
Expand All @@ -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)
{
Expand All @@ -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.