aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorkcat <[email protected]>2019-01-07 04:36:50 -0800
committerGitHub <[email protected]>2019-01-07 04:36:50 -0800
commit2a7f27ca58f9897be06fe815a46ea76a01734a0b (patch)
treeca9aa7e99770f175209e50f1f88ed3e9b656c89b /common
parent4d047e2bc166e8155dd9714e53efda09def2b6ef (diff)
parent0537414bafe80e5e32486672ddce82581fb5e1c3 (diff)
Merge pull request #260 from ShFil119/impr/nullptr
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 {