From b605b95749aad90b53e6c58a1ee43b50f8217e7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Wed, 29 Mar 2017 13:34:57 +0200 Subject: Add CPP11 header to define nullptr & constexpr (#5471) This header permit to use nullptr & constexpr keywords in portable code segments and benefit from nullptr & constexpr when using C++11 and greater --- src/reflowscan.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/reflowscan.cpp') diff --git a/src/reflowscan.cpp b/src/reflowscan.cpp index 49b9406d7..eec371022 100644 --- a/src/reflowscan.cpp +++ b/src/reflowscan.cpp @@ -22,12 +22,13 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "mapblock.h" #include "nodedef.h" #include "util/timetaker.h" +#include "util/cpp11.h" ReflowScan::ReflowScan(Map *map, INodeDefManager *ndef) : m_map(map), m_ndef(ndef), - m_liquid_queue(NULL) + m_liquid_queue(nullptr) { } @@ -41,7 +42,7 @@ void ReflowScan::scan(MapBlock *block, UniqueQueue *liquid_queue) // scanned block. Blocks are only added to the lookup if they are really // needed. The lookup is indexed manually to use the same index in a // bit-array (of uint32 type) which stores for unloaded blocks that they - // were already fetched from Map but were actually NULL. + // were already fetched from Map but were actually nullptr. memset(m_lookup, 0, sizeof(m_lookup)); int block_idx = 1 + (1 * 9) + (1 * 3); m_lookup[block_idx] = block; -- cgit v1.2.3