refactor: replace NULL with nullptr across C++ codebase

Excludes vendored C libs (zlib, Miles, DirectXMath, boost, Iggy).
This commit is contained in:
MatthewBeshay
2026-03-30 16:25:52 +11:00
parent a330ecdcbb
commit dfb0e3b03e
752 changed files with 5396 additions and 5396 deletions

View File

@@ -31,7 +31,7 @@ BasicTree::BasicTree(bool doUpdate) : Feature(doUpdate) {
trunkWidth = 1;
heightVariance = 12;
foliageHeight = 4;
foliageCoords = NULL;
foliageCoords = nullptr;
foliageCoordsLength = 0;
}
@@ -118,7 +118,7 @@ void BasicTree::prepare() {
// Delete the rest of the array whilst we still know how big it was
for (int i = clusterCount; i < clustersPerY * height; i++) {
delete[] tempFoliageCoords[i];
tempFoliageCoords[i] = NULL;
tempFoliageCoords[i] = nullptr;
}
// 4J - original code for above is the following, it isn't obvious to me why
// it is doing a copy of the array, so let's not for now
@@ -445,7 +445,7 @@ bool BasicTree::checkLocation() {
// 4J Stu Added to stop tree features generating areas previously place by
// game rule generation
if (app.getLevelGenerationOptions() != NULL) {
if (app.getLevelGenerationOptions() != nullptr) {
LevelGenerationOptions* levelGenOptions =
app.getLevelGenerationOptions();
bool intersects = levelGenOptions->checkIntersects(