summaryrefslogtreecommitdiff
path: root/src/terraform_gui.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/terraform_gui.cpp
parent3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff)
downloadopenttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/terraform_gui.cpp')
-rw-r--r--src/terraform_gui.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index a69917040..70c7be149 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -293,8 +293,8 @@ struct TerraformToolbarWindow : Window {
static EventState TerraformToolbarGlobalHotkeys(int hotkey)
{
if (_game_mode != GM_NORMAL) return ES_NOT_HANDLED;
- Window *w = ShowTerraformToolbar(NULL);
- if (w == NULL) return ES_NOT_HANDLED;
+ Window *w = ShowTerraformToolbar(nullptr);
+ if (w == nullptr) return ES_NOT_HANDLED;
return w->OnHotkey(hotkey);
}
@@ -353,14 +353,14 @@ static WindowDesc _terraform_desc(
/**
* Show the toolbar for terraforming in the game.
* @param link The toolbar we might want to link to.
- * @return The allocated toolbar if the window was newly opened, else \c NULL.
+ * @return The allocated toolbar if the window was newly opened, else \c nullptr.
*/
Window *ShowTerraformToolbar(Window *link)
{
- if (!Company::IsValidID(_local_company)) return NULL;
+ if (!Company::IsValidID(_local_company)) return nullptr;
Window *w;
- if (link == NULL) {
+ if (link == nullptr) {
w = AllocateWindowDescFront<TerraformToolbarWindow>(&_terraform_desc, 0);
return w;
}
@@ -631,7 +631,7 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
break;
case WID_ETT_RESET_LANDSCAPE: // Reset landscape
- ShowQuery(STR_QUERY_RESET_LANDSCAPE_CAPTION, STR_RESET_LANDSCAPE_CONFIRMATION_TEXT, NULL, ResetLandscapeConfirmationCallback);
+ ShowQuery(STR_QUERY_RESET_LANDSCAPE_CAPTION, STR_RESET_LANDSCAPE_CONFIRMATION_TEXT, nullptr, ResetLandscapeConfirmationCallback);
break;
default: NOT_REACHED();
@@ -720,7 +720,7 @@ static EventState TerraformToolbarEditorGlobalHotkeys(int hotkey)
{
if (_game_mode != GM_EDITOR) return ES_NOT_HANDLED;
Window *w = ShowEditorTerraformToolbar();
- if (w == NULL) return ES_NOT_HANDLED;
+ if (w == nullptr) return ES_NOT_HANDLED;
return w->OnHotkey(hotkey);
}
@@ -747,7 +747,7 @@ static WindowDesc _scen_edit_land_gen_desc(
/**
* Show the toolbar for terraforming in the scenario editor.
- * @return The allocated toolbar if the window was newly opened, else \c NULL.
+ * @return The allocated toolbar if the window was newly opened, else \c nullptr.
*/
Window *ShowEditorTerraformToolbar()
{