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

@@ -21,7 +21,7 @@ ReadOnlyChunkCache::~ReadOnlyChunkCache() {
bool ReadOnlyChunkCache::hasChunk(int x, int z) {
int slot = (x & LEN_MASK) | ((z & LEN_MASK) * LEN);
return chunks[slot] != NULL && (chunks[slot]->isAt(x, z));
return chunks[slot] != nullptr && (chunks[slot]->isAt(x, z));
}
LevelChunk* ReadOnlyChunkCache::create(int x, int z) { return getChunk(x, z); }
@@ -32,7 +32,7 @@ LevelChunk* ReadOnlyChunkCache::getChunk(int x, int z) {
// try {
if (!hasChunk(x, z)) {
LevelChunk* newChunk = load(x, z);
if (newChunk == NULL) {
if (newChunk == nullptr) {
newChunk = new EmptyLevelChunk(level, emptyPixels, x, z);
}
chunks[slot] = newChunk;
@@ -68,10 +68,10 @@ std::wstring ReadOnlyChunkCache::gatherStats() { return L"ReadOnlyChunkCache"; }
std::vector<Biome::MobSpawnerData*>* ReadOnlyChunkCache::getMobsAt(
MobCategory* mobCategory, int x, int y, int z) {
return NULL;
return nullptr;
}
TilePos* ReadOnlyChunkCache::findNearestMapFeature(
Level* level, const std::wstring& featureName, int x, int y, int z) {
return NULL;
return nullptr;
}