Convert almalloc.c to C++
This commit is contained in:
+1
-1
@@ -745,7 +745,7 @@ SET(COMMON_OBJS
|
||||
common/alcomplex.cpp
|
||||
common/alcomplex.h
|
||||
common/align.h
|
||||
common/almalloc.c
|
||||
common/almalloc.cpp
|
||||
common/almalloc.h
|
||||
common/atomic.h
|
||||
common/bool.h
|
||||
|
||||
@@ -37,7 +37,7 @@ void *al_malloc(size_t alignment, size_t size)
|
||||
#elif defined(HAVE__ALIGNED_MALLOC)
|
||||
return _aligned_malloc(size, alignment);
|
||||
#else
|
||||
char *ret = malloc(size+alignment);
|
||||
char *ret = static_cast<char*>(malloc(size+alignment));
|
||||
if(ret != NULL)
|
||||
{
|
||||
*(ret++) = 0x00;
|
||||
@@ -64,7 +64,7 @@ void al_free(void *ptr)
|
||||
#else
|
||||
if(ptr != NULL)
|
||||
{
|
||||
char *finder = ptr;
|
||||
char *finder = static_cast<char*>(ptr);
|
||||
do {
|
||||
--finder;
|
||||
} while(*finder == 0x55);
|
||||
Reference in New Issue
Block a user