1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 07:43:01 +01:00

Replace NULL with nullptr in C++ files

This commit is contained in:
Gymnasiast
2018-01-29 17:06:01 +01:00
committed by Richard Jenkins
parent 6bd0b2baea
commit 5cc21fd21b
26 changed files with 184 additions and 184 deletions

View File

@@ -561,7 +561,7 @@ rct_window *window_create_auto_pos(sint32 width, sint32 height, rct_window_event
// if (cls & 0x80) {
// cls &= ~0x80;
// rct_window *w = window_find_by_number(0, 0);
// if (w != NULL) {
// if (w != nullptr) {
// if (w->x > -60 && w->x < screenWidth - 20) {
// if (w->y < screenHeight - 20) {
// sint32 x = w->x;
@@ -984,7 +984,7 @@ void widget_invalidate(rct_window *w, rct_widgetindex widgetIndex)
{
rct_widget* widget;
assert(w != NULL);
assert(w != nullptr);
#ifdef DEBUG
for (sint32 i = 0; i <= widgetIndex; i++) {
assert(w->widgets[i].type != WWT_LAST);
@@ -1084,7 +1084,7 @@ void window_update_scroll_widgets(rct_window *w)
widgetIndex = 0;
scrollIndex = 0;
assert(w != NULL);
assert(w != nullptr);
for (widget = w->widgets; widget->type != WWT_LAST; widget++, widgetIndex++) {
if (widget->type != WWT_SCROLL)
continue;
@@ -1126,7 +1126,7 @@ sint32 window_get_scroll_data_index(rct_window *w, rct_widgetindex widget_index)
sint32 i, result;
result = 0;
assert(w != NULL);
assert(w != nullptr);
for (i = 0; i < widget_index; i++) {
if (w->widgets[i].type == WWT_SCROLL)
result++;
@@ -1307,7 +1307,7 @@ void window_scroll_to_viewport(rct_window *w)
{
sint32 x, y, z;
rct_window *mainWindow;
assert(w != NULL);
assert(w != nullptr);
// In original checked to make sure x and y were not -1 as well.
if (w->viewport == nullptr || w->viewport_focus_coordinates.y == -1)
return;
@@ -1350,7 +1350,7 @@ void window_scroll_to_location(rct_window *w, sint32 x, sint32 y, sint32 z)
/* .z = */ (sint16)z
};
assert(w != NULL);
assert(w != nullptr);
window_unfollow_sprite(w);