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:
commit
54a1c6d203
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user