Merge: Codechange: Use null pointer literal instead of the NULL macro

This commit is contained in:
Jonathan G Rennison
2019-04-11 18:14:13 +01:00
585 changed files with 6604 additions and 6604 deletions

View File

@@ -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);
@@ -176,7 +176,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++) {
@@ -197,7 +197,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();
@@ -283,7 +283,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();
@@ -307,7 +307,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;
@@ -350,7 +350,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);
}
}