mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/4jcraft.git
synced 2026-07-17 06:28:44 +00:00
refactor: replace NULL with nullptr across C++ codebase
Excludes vendored C libs (zlib, Miles, DirectXMath, boost, Iggy).
This commit is contained in:
@@ -34,10 +34,10 @@ UIScene_AbstractContainerMenu::~UIScene_AbstractContainerMenu() {
|
||||
void UIScene_AbstractContainerMenu::handleDestroy() {
|
||||
app.DebugPrintf("UIScene_AbstractContainerMenu::handleDestroy\n");
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
if (pMinecraft->localgameModes[m_iPad] != NULL) {
|
||||
if (pMinecraft->localgameModes[m_iPad] != nullptr) {
|
||||
TutorialMode* gameMode =
|
||||
(TutorialMode*)pMinecraft->localgameModes[m_iPad];
|
||||
if (gameMode != NULL)
|
||||
if (gameMode != nullptr)
|
||||
gameMode->getTutorial()->changeTutorialState(
|
||||
m_previousTutorialState);
|
||||
}
|
||||
@@ -47,7 +47,7 @@ void UIScene_AbstractContainerMenu::handleDestroy() {
|
||||
// packet loss. We need to make sure that we call closeContainer() anytime
|
||||
// this menu is closed, even if it is forced to close by some other reason
|
||||
// (like the player dying)
|
||||
if (pMinecraft->localplayers[m_iPad] != NULL &&
|
||||
if (pMinecraft->localplayers[m_iPad] != nullptr &&
|
||||
pMinecraft->localplayers[m_iPad]->containerMenu->containerId ==
|
||||
m_menu->containerId) {
|
||||
pMinecraft->localplayers[m_iPad]->closeContainer();
|
||||
@@ -119,8 +119,8 @@ void UIScene_AbstractContainerMenu::PlatformInitialize(int iPad,
|
||||
m_fPointerMaxX = m_fPanelMaxX + fPointerWidth;
|
||||
m_fPointerMaxY = m_fPanelMaxY + (fPointerHeight / 2);
|
||||
|
||||
// m_hPointerText=NULL;
|
||||
// m_hPointerTextBkg=NULL;
|
||||
// m_hPointerText=nullptr;
|
||||
// m_hPointerTextBkg=nullptr;
|
||||
|
||||
// Put the pointer over first item in use row to start with.
|
||||
UIVec2D itemPos;
|
||||
@@ -201,8 +201,8 @@ void UIScene_AbstractContainerMenu::render(S32 width, S32 height,
|
||||
void UIScene_AbstractContainerMenu::customDraw(
|
||||
IggyCustomDrawCallbackRegion* region) {
|
||||
Minecraft* pMinecraft = Minecraft::GetInstance();
|
||||
if (pMinecraft->localplayers[m_iPad] == NULL ||
|
||||
pMinecraft->localgameModes[m_iPad] == NULL)
|
||||
if (pMinecraft->localplayers[m_iPad] == nullptr ||
|
||||
pMinecraft->localgameModes[m_iPad] == nullptr)
|
||||
return;
|
||||
|
||||
int slotId = parseSlotId(region->name);
|
||||
@@ -221,7 +221,7 @@ void UIScene_AbstractContainerMenu::customDraw(
|
||||
}
|
||||
}
|
||||
|
||||
if (item != NULL)
|
||||
if (item != nullptr)
|
||||
customDrawSlotControl(
|
||||
region, m_iPad, item,
|
||||
m_menu->isValidIngredient(item, slotId) ? 1.0f : 0.5f,
|
||||
@@ -288,7 +288,7 @@ Slot* UIScene_AbstractContainerMenu::getSlot(ESceneSection eSection,
|
||||
if (slot)
|
||||
return slot;
|
||||
else
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool UIScene_AbstractContainerMenu::isSlotEmpty(ESceneSection eSection,
|
||||
|
||||
Reference in New Issue
Block a user