diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-04-10 22:07:06 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2019-04-10 23:22:20 +0200 |
commit | 7c8e7c6b6e16d4a26259a676db32d8776b99817e (patch) | |
tree | 99f134b7e66367cf11e10bc5061896eab4a3264f /src/genworld_gui.cpp | |
parent | 3b4f224c0bc50e7248050d4bcbb6d83fd510c1cc (diff) | |
download | openttd-7c8e7c6b6e16d4a26259a676db32d8776b99817e.tar.xz |
Codechange: Use null pointer literal instead of the NULL macro
Diffstat (limited to 'src/genworld_gui.cpp')
-rw-r--r-- | src/genworld_gui.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/genworld_gui.cpp b/src/genworld_gui.cpp index 53cc2d39e..550a193d7 100644 --- a/src/genworld_gui.cpp +++ b/src/genworld_gui.cpp @@ -442,7 +442,7 @@ struct GenerateLandscapeWindow : public Window { void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override { - const StringID *strs = NULL; + const StringID *strs = nullptr; switch (widget) { case WID_GL_MAX_HEIGHTLEVEL_TEXT: SetDParam(0, MAX_TILE_HEIGHT); @@ -509,7 +509,7 @@ struct GenerateLandscapeWindow : public Window { default: return; } - if (strs != NULL) { + if (strs != nullptr) { while (*strs != INVALID_STRING_ID) { *size = maxdim(*size, GetStringBoundingBox(*strs++)); } @@ -761,7 +761,7 @@ struct GenerateLandscapeWindow : public Window { void OnQueryTextFinished(char *str) override { /* Was 'cancel' pressed? */ - if (str == NULL) return; + if (str == nullptr) return; int32 value; if (!StrEmpty(str)) { @@ -808,14 +808,14 @@ struct GenerateLandscapeWindow : public Window { }; static WindowDesc _generate_landscape_desc( - WDP_CENTER, NULL, 0, 0, + WDP_CENTER, nullptr, 0, 0, WC_GENERATE_LANDSCAPE, WC_NONE, 0, _nested_generate_landscape_widgets, lengthof(_nested_generate_landscape_widgets) ); static WindowDesc _heightmap_load_desc( - WDP_CENTER, NULL, 0, 0, + WDP_CENTER, nullptr, 0, 0, WC_GENERATE_LANDSCAPE, WC_NONE, 0, _nested_heightmap_load_widgets, lengthof(_nested_heightmap_load_widgets) @@ -1110,7 +1110,7 @@ static const NWidgetPart _nested_create_scenario_widgets[] = { }; static WindowDesc _create_scenario_desc( - WDP_CENTER, NULL, 0, 0, + WDP_CENTER, nullptr, 0, 0, WC_GENERATE_LANDSCAPE, WC_NONE, 0, _nested_create_scenario_widgets, lengthof(_nested_create_scenario_widgets) @@ -1138,7 +1138,7 @@ static const NWidgetPart _nested_generate_progress_widgets[] = { static WindowDesc _generate_progress_desc( - WDP_CENTER, NULL, 0, 0, + WDP_CENTER, nullptr, 0, 0, WC_MODAL_PROGRESS, WC_NONE, 0, _nested_generate_progress_widgets, lengthof(_nested_generate_progress_widgets) |