aboutsummaryrefslogtreecommitdiff
path: root/src/clientmap.cpp
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-06-17 19:11:28 +0200
committerGitHub <noreply@github.com>2017-06-17 19:11:28 +0200
commit8f7785771b9e02b1a1daf7a252550d78ea93053d (patch)
tree7a4e4b524dbc63fed3dac99a3844b634cc621d0d /src/clientmap.cpp
parent76be103a91d6987527af19e87d93007be8ba8a67 (diff)
downloadminetest-8f7785771b9e02b1a1daf7a252550d78ea93053d.tar.xz
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
Diffstat (limited to 'src/clientmap.cpp')
-rw-r--r--src/clientmap.cpp8
1 files changed, 4 insertions, 4 deletions
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;