From 8f7785771b9e02b1a1daf7a252550d78ea93053d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= 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/game.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index c32ab6f30..fc6df462d 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -2643,7 +2643,7 @@ void Game::openInventory() */ LocalPlayer *player = client->getEnv().getLocalPlayer(); - if (player == NULL || player->getCAO() == NULL) + if (!player || !player->getCAO()) return; infostream << "the_game: " << "Launching inventory" << std::endl; @@ -3402,7 +3402,7 @@ void Game::updateCamera(u32 busy_time, f32 dtime) GenericCAO *playercao = player->getCAO(); // If playercao not loaded, don't change camera - if (playercao == NULL) + if (!playercao) return; camera->toggleCameraMode(); -- cgit v1.2.3