summaryrefslogtreecommitdiff
path: root/src/genworld.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-04-10 22:07:06 +0100
committerMichael Lutz <michi@icosahedron.de>2019-04-10 23:22:20 +0200
commit7c8e7c6b6e16d4a26259a676db32d8776b99817e (patch)
tree99f134b7e66367cf11e10bc5061896eab4a3264f /src/genworld.cpp
parent3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff)
downloadopenttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/genworld.cpp')
-rw-r--r--src/genworld.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/genworld.cpp b/src/genworld.cpp
index ee8768b62..f09b183e9 100644
--- a/src/genworld.cpp
+++ b/src/genworld.cpp
@@ -82,8 +82,8 @@ static void CleanupGeneration()
/* Show all vital windows again, because we have hidden them */
if (_gw.threaded && _game_mode != GM_MENU) ShowVitalWindows();
SetModalProgress(false);
- _gw.proc = NULL;
- _gw.abortp = NULL;
+ _gw.proc = nullptr;
+ _gw.abortp = nullptr;
_gw.threaded = false;
DeleteWindowByClass(WC_MODAL_PROGRESS);
@@ -171,7 +171,7 @@ static void _GenerateWorld()
if (_game_mode != GM_EDITOR) {
Game::StartNew();
- if (Game::GetInstance() != NULL) {
+ if (Game::GetInstance() != nullptr) {
SetGeneratingWorldProgress(GWP_RUNSCRIPT, 2500);
_generating_world = true;
for (i = 0; i < 2500; i++) {
@@ -192,7 +192,7 @@ static void _GenerateWorld()
SetGeneratingWorldProgress(GWP_GAME_START, 1);
/* Call any callback */
- if (_gw.proc != NULL) _gw.proc();
+ if (_gw.proc != nullptr) _gw.proc();
IncreaseGeneratingWorldProgress(GWP_GAME_START);
CleanupGeneration();
@@ -278,7 +278,7 @@ void HandleGeneratingWorldAbortion()
/* Clean up - in SE create an empty map, otherwise, go to intro menu */
_switch_mode = (_game_mode == GM_EDITOR) ? SM_EDITOR : SM_MENU;
- if (_gw.abortp != NULL) _gw.abortp();
+ if (_gw.abortp != nullptr) _gw.abortp();
CleanupGeneration();
@@ -302,7 +302,7 @@ void GenerateWorld(GenWorldMode mode, uint size_x, uint size_y, bool reset_setti
_gw.size_y = size_y;
SetModalProgress(true);
_gw.abort = false;
- _gw.abortp = NULL;
+ _gw.abortp = nullptr;
_gw.lc = _local_company;
_gw.quit_thread = false;
_gw.threaded = true;
@@ -345,7 +345,7 @@ void GenerateWorld(GenWorldMode mode, uint size_x, uint size_y, bool reset_setti
ShowGenerateWorldProgress();
/* Centre the view on the map */
- if (FindWindowById(WC_MAIN_WINDOW, 0) != NULL) {
+ if (FindWindowById(WC_MAIN_WINDOW, 0) != nullptr) {
ScrollMainWindowToTile(TileXY(MapSizeX() / 2, MapSizeY() / 2), true);
}
}