1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 01:04:50 +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

@@ -994,9 +994,9 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint(paint_session * s
if (sprites[direction][index][0] != 0)
{
uint32 imageId = sprites[direction][index][0] | colourFlags;
LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction][index][0]);
LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index][0]);
LocationXY16 boundsLength = boundsLengths[direction][index][0];
LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 }
LocationXYZ16 boundsOffset = (boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 }
: boundsOffsets[direction][index][0]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[0], height,
@@ -1005,9 +1005,9 @@ void track_paint_util_right_helix_up_small_quarter_tiles_paint(paint_session * s
if (sprites[direction][index][1] != 0)
{
uint32 imageId = sprites[direction][index][1] | colourFlags;
LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction][index][1]);
LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index][1]);
LocationXY16 boundsLength = boundsLengths[direction][index][1];
LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 }
LocationXYZ16 boundsOffset = (boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 }
: boundsOffsets[direction][index][1]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[1], height,
@@ -1096,9 +1096,9 @@ void track_paint_util_right_helix_up_large_quarter_tiles_paint(paint_session * s
if (sprites[direction][index][0] != 0)
{
uint32 imageId = sprites[direction][index][0] | colourFlags;
LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction][index][0]);
LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index][0]);
LocationXY16 boundsLength = boundsLengths[direction][index][0];
LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 }
LocationXYZ16 boundsOffset = (boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 }
: boundsOffsets[direction][index][0]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[0], height,
@@ -1107,9 +1107,9 @@ void track_paint_util_right_helix_up_large_quarter_tiles_paint(paint_session * s
if (sprites[direction][index][1] != 0)
{
uint32 imageId = sprites[direction][index][1] | colourFlags;
LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction][index][1]);
LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index][1]);
LocationXY16 boundsLength = boundsLengths[direction][index][1];
LocationXYZ16 boundsOffset = (boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 }
LocationXYZ16 boundsOffset = (boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 }
: boundsOffsets[direction][index][1]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[1], height,
@@ -1270,10 +1270,10 @@ void track_paint_util_eighth_to_diag_tiles_paint(paint_session * session, const
}
uint32 imageId = sprites[direction][index] | colourFlags;
LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction][index]);
LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index]);
LocationXY16 boundsLength = boundsLengths[direction][index];
LocationXYZ16 boundsOffset =
(boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index]);
(boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness[direction][index],
height, boundsOffset.x, boundsOffset.y, height + boundsOffset.z, rotation);
@@ -1312,10 +1312,10 @@ void track_paint_util_diag_tiles_paint(paint_session * session, sint8 thickness,
}
uint32 imageId = sprites[direction] | colourFlags;
LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction]);
LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction]);
LocationXY16 boundsLength = boundsLengths[direction];
LocationXYZ16 boundsOffset =
(boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction]);
(boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness, height,
boundsOffset.x, boundsOffset.y, height + boundsOffset.z, rotation);
@@ -1432,10 +1432,10 @@ void track_paint_util_right_quarter_turn_5_tiles_paint(paint_sessi
}
uint32 imageId = sprites[direction][index] | colourFlags;
LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction][index]);
LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index]);
LocationXY16 boundsLength = boundsLengths[direction][index];
LocationXYZ16 boundsOffset =
(boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index]);
(boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness, height,
boundsOffset.x, boundsOffset.y, height + boundsOffset.z, rotation);
@@ -1598,10 +1598,10 @@ void track_paint_util_right_quarter_turn_3_tiles_paint(paint_sessi
}
uint32 imageId = sprites[direction][index] | colourFlags;
LocationXY16 offset = (offsets == NULL ? LocationXY16{ 0, 0 } : offsets[direction][index]);
LocationXY16 offset = (offsets == nullptr ? LocationXY16{ 0, 0 } : offsets[direction][index]);
LocationXY16 boundsLength = boundsLengths[direction][index];
LocationXYZ16 boundsOffset =
(boundsOffsets == NULL ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index]);
(boundsOffsets == nullptr ? LocationXYZ16{ offset.x, offset.y, 0 } : boundsOffsets[direction][index]);
sub_98197C(session, imageId, (sint8)offset.x, (sint8)offset.y, boundsLength.x, boundsLength.y, thickness, height,
boundsOffset.x, boundsOffset.y, height + boundsOffset.z, rotation);
@@ -2186,10 +2186,10 @@ void track_paint(paint_session * session, uint8 direction, sint32 height, rct_ti
}
TRACK_PAINT_FUNCTION_GETTER paintFunctionGetter = RideTypeTrackPaintFunctions[ride->type];
if (paintFunctionGetter != NULL)
if (paintFunctionGetter != nullptr)
{
TRACK_PAINT_FUNCTION paintFunction = paintFunctionGetter(trackType, direction);
if (paintFunction != NULL)
if (paintFunction != nullptr)
{
paintFunction(session, rideIndex, trackSequence, direction, height, tileElement);
}