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

@@ -82,7 +82,7 @@ MultiPlayerChunkCache::MultiPlayerChunkCache(Level* level) {
}
}
} else {
waterChunk = NULL;
waterChunk = nullptr;
}
this->level = level;
@@ -121,7 +121,7 @@ bool MultiPlayerChunkCache::reallyHasChunk(int x, int z) {
int idx = ix * XZSIZE + iz;
LevelChunk* chunk = cache[idx];
if (chunk == NULL) {
if (chunk == nullptr) {
return false;
}
return hasData[idx];
@@ -157,7 +157,7 @@ LevelChunk* MultiPlayerChunkCache::create(int x, int z) {
LevelChunk* chunk = cache[idx];
LevelChunk* lastChunk = chunk;
if (chunk == NULL) {
if (chunk == nullptr) {
EnterCriticalSection(&m_csLoadCreate);
// LevelChunk *chunk;
@@ -165,7 +165,7 @@ LevelChunk* MultiPlayerChunkCache::create(int x, int z) {
{
// 4J-JEV: We are about to use shared data, abort if the server is
// stopped and the data is deleted.
if (MinecraftServer::getInstance()->serverHalted()) return NULL;
if (MinecraftServer::getInstance()->serverHalted()) return nullptr;
// If we're the host, then don't create the chunk, share data from
// the server's copy
@@ -249,7 +249,7 @@ LevelChunk* MultiPlayerChunkCache::getChunk(int x, int z) {
int idx = ix * XZSIZE + iz;
LevelChunk* chunk = cache[idx];
if (chunk == NULL) {
if (chunk == nullptr) {
return emptyChunk;
} else {
return chunk;
@@ -269,12 +269,12 @@ void MultiPlayerChunkCache::postProcess(ChunkSource* parent, int x, int z) {}
std::vector<Biome::MobSpawnerData*>* MultiPlayerChunkCache::getMobsAt(
MobCategory* mobCategory, int x, int y, int z) {
return NULL;
return nullptr;
}
TilePos* MultiPlayerChunkCache::findNearestMapFeature(
Level* level, const std::wstring& featureName, int x, int y, int z) {
return NULL;
return nullptr;
}
void MultiPlayerChunkCache::recreateLogicStructuresForChunk(int chunkX,