From 8f7785771b9e02b1a1daf7a252550d78ea93053d Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Sat, 17 Jun 2017 19:11:28 +0200 Subject: Cpp11 initializers 2 (#5999) * C++11 patchset 10: continue cleanup on constructors * Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop) * More classes cleanup * More classes cleanup + change NULL tests to boolean tests --- src/clientmap.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/clientmap.cpp') diff --git a/src/clientmap.cpp b/src/clientmap.cpp index 9186e3cab..5e88cab45 100644 --- a/src/clientmap.cpp +++ b/src/clientmap.cpp @@ -212,11 +212,11 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver) if not seen on display */ - if (block->mesh != NULL) + if (block->mesh) block->mesh->updateCameraOffset(m_camera_offset); float range = 100000 * BS; - if (m_control.range_all == false) + if (!m_control.range_all) range = m_control.wanted_range * BS; float d = 0.0; @@ -229,7 +229,7 @@ void ClientMap::updateDrawList(video::IVideoDriver* driver) /* Ignore if mesh doesn't exist */ - if (block->mesh == NULL) { + if (!block->mesh) { blocks_in_range_without_mesh++; continue; } @@ -398,7 +398,7 @@ void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass) MapBlock *block = i->second; // If the mesh of the block happened to get deleted, ignore it - if (block->mesh == NULL) + if (!block->mesh) continue; float d = 0.0; -- cgit v1.2.3