aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2018-11-17 19:01:10 -0800
committerChris Robinson <[email protected]>2018-11-17 19:01:10 -0800
commit1ac41d3ea03aed456a94187bf8e0381eeb4168e6 (patch)
treea1c862b6b88f3b487b3820f526028feb34b1b00f
parent8c69fb046c9a3b983f360a71614512e0e0e5aeac (diff)
Convert almalloc.c to C++
-rw-r--r--CMakeLists.txt2
-rw-r--r--common/almalloc.cpp (renamed from common/almalloc.c)4
2 files changed, 3 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ebb8ec19..3e4c6d4b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
diff --git a/common/almalloc.c b/common/almalloc.cpp
index 0d982ca1..1b90d1c0 100644
--- a/common/almalloc.c
+++ b/common/almalloc.cpp
@@ -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);