1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00

Merge pull request #51 from maximsmol/tf2

tf2: Fix IsPowerOfTwo clash in memalloc
This commit is contained in:
David Anderson 2019-03-26 12:02:34 +09:00 committed by GitHub
commit 54a1c6d203
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -178,7 +178,7 @@ inline void *MemAlloc_AllocAligned( size_t size, size_t align )
{
unsigned char *pAlloc, *pResult;
if (!IsPowerOfTwo(align))
if (!ValueIsPowerOfTwo(align))
return NULL;
align = (align > sizeof(void *) ? align : sizeof(void *)) - 1;
@ -196,7 +196,7 @@ inline void *MemAlloc_AllocAligned( size_t size, size_t align, const char *pszFi
{
unsigned char *pAlloc, *pResult;
if (!IsPowerOfTwo(align))
if (!ValueIsPowerOfTwo(align))
return NULL;
align = (align > sizeof(void *) ? align : sizeof(void *)) - 1;
@ -248,7 +248,7 @@ inline void *MemAlloc_AllocAlignedFileLine( size_t size, size_t align, const cha
inline void *MemAlloc_ReallocAligned( void *ptr, size_t size, size_t align )
{
if ( !IsPowerOfTwo( align ) )
if ( !ValueIsPowerOfTwo( align ) )
return NULL;
// Don't change alignment between allocation + reallocation.