From 0537414bafe80e5e32486672ddce82581fb5e1c3 Mon Sep 17 00:00:00 2001 From: Filip Gawin Date: Mon, 7 Jan 2019 12:37:13 +0100 Subject: Use nullptr in cpp files --- common/almalloc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/almalloc.cpp b/common/almalloc.cpp index 7e83672b..da0a1d37 100644 --- a/common/almalloc.cpp +++ b/common/almalloc.cpp @@ -33,12 +33,12 @@ void *al_malloc(size_t alignment, size_t size) void *ret; if(posix_memalign(&ret, alignment, size) == 0) return ret; - return NULL; + return nullptr; #elif defined(HAVE__ALIGNED_MALLOC) return _aligned_malloc(size, alignment); #else char *ret = static_cast(malloc(size+alignment)); - if(ret != NULL) + if(ret != nullptr) { *(ret++) = 0x00; while(((ptrdiff_t)ret&(alignment-1)) != 0) @@ -62,7 +62,7 @@ void al_free(void *ptr) noexcept #elif defined(HAVE__ALIGNED_MALLOC) _aligned_free(ptr); #else - if(ptr != NULL) + if(ptr != nullptr) { char *finder = static_cast(ptr); do { -- cgit v1.2.3