Convert almalloc.c to C++

This commit is contained in:
Chris Robinson
2018-11-17 19:01:10 -08:00
parent 8c69fb046c
commit 1ac41d3ea0
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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);