aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorFilip Gawin <[email protected]>2019-01-07 12:37:13 +0100
committerFilip Gawin <[email protected]>2019-01-07 12:37:13 +0100
commit0537414bafe80e5e32486672ddce82581fb5e1c3 (patch)
treec24a0957f54fb11b85bc2ba76e301cbfa2c3ebf3 /common
parentfababe76c4f0482fb2527ef931b84681dd133ca6 (diff)
Use nullptr in cpp files
Diffstat (limited to 'common')
-rw-r--r--common/almalloc.cpp6
1 files changed, 3 insertions, 3 deletions
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<char*>(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<char*>(ptr);
do {