mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-06-01 10:55:21 +00:00
refactor: replace NULL with nullptr across C++ codebase
Excludes vendored C libs (zlib, Miles, DirectXMath, boost, Iggy).
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user