mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-05-31 07:15:24 +00:00
refactor: replace NULL with nullptr across C++ codebase
Excludes vendored C libs (zlib, Miles, DirectXMath, boost, Iggy).
This commit is contained in:
@@ -14,7 +14,7 @@ TutorialMode::TutorialMode(int iPad, Minecraft* minecraft,
|
||||
: MultiPlayerGameMode(minecraft, connection), m_iPad(iPad) {}
|
||||
|
||||
TutorialMode::~TutorialMode() {
|
||||
if (tutorial != NULL) delete tutorial;
|
||||
if (tutorial != nullptr) delete tutorial;
|
||||
}
|
||||
|
||||
void TutorialMode::startDestroyBlock(int x, int y, int z, int face) {
|
||||
@@ -33,13 +33,13 @@ bool TutorialMode::destroyBlock(int x, int y, int z, int face) {
|
||||
}
|
||||
std::shared_ptr<ItemInstance> item = minecraft->player->getSelectedItem();
|
||||
int damageBefore;
|
||||
if (item != NULL) {
|
||||
if (item != nullptr) {
|
||||
damageBefore = item->getDamageValue();
|
||||
}
|
||||
bool changed = MultiPlayerGameMode::destroyBlock(x, y, z, face);
|
||||
|
||||
if (!tutorial->m_allTutorialsComplete) {
|
||||
if (item != NULL && item->isDamageableItem()) {
|
||||
if (item != nullptr && item->isDamageableItem()) {
|
||||
int max = item->getMaxDamage();
|
||||
int damageNow = item->getDamageValue();
|
||||
|
||||
@@ -78,7 +78,7 @@ bool TutorialMode::useItemOn(std::shared_ptr<Player> player, Level* level,
|
||||
tutorial->useItemOn(level, item, x, y, z, bTestUseOnly);
|
||||
|
||||
if (!bTestUseOnly) {
|
||||
if (item != NULL) {
|
||||
if (item != nullptr) {
|
||||
haveItem = true;
|
||||
itemCount = item->count;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user