aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 15:58:20 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 15:58:20 +0700
commit7074f35e4ba831e358117842b99ee35b87f85ae5 (patch)
tree7d440d23473196af3056bf2ff4c59d9e740a06f5 /Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp
parentd63f79325f85e014361eb8cf1e41eaebedb1ae71 (diff)
shared_ptr -> std::shared_ptr
This is one of the first commits in a plan to remove all `using namespace std;` lines in the entire codebase as it is considered anti-pattern today.
Diffstat (limited to 'Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp')
-rw-r--r--Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp b/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp
index dc2bac48..cd630651 100644
--- a/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_TradingMenu.cpp
@@ -11,7 +11,7 @@ UIScene_TradingMenu::UIScene_TradingMenu(int iPad, void *_initData, UILayer *par
{
// Setup all the Iggy references we need for this scene
initialiseMovie();
-
+
m_showingLeftArrow = true;
m_showingRightArrow = true;
@@ -36,7 +36,7 @@ UIScene_TradingMenu::UIScene_TradingMenu(int iPad, void *_initData, UILayer *par
}
m_menu = new MerchantMenu( initData->inventory, initData->trader, initData->level );
-
+
Minecraft::GetInstance()->localplayers[iPad]->containerMenu = m_menu;
m_slotListRequest1.addSlots(BUY_A,1);
@@ -93,7 +93,7 @@ void UIScene_TradingMenu::handleDestroy()
}
// 4J Stu - Fix for #11302 - TCR 001: Network Connectivity: Host crashed after being killed by the client while accessing a chest during burst 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)
+ // 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) pMinecraft->localplayers[m_iPad]->closeContainer();
ui.OverrideSFX(m_iPad,ACTION_MENU_A,false);
@@ -147,12 +147,12 @@ void UIScene_TradingMenu::customDraw(IggyCustomDrawCallbackRegion *region)
Minecraft *pMinecraft = Minecraft::GetInstance();
if(pMinecraft->localplayers[m_iPad] == NULL || pMinecraft->localgameModes[m_iPad] == NULL) return;
- shared_ptr<ItemInstance> item = nullptr;
+ std::shared_ptr<ItemInstance> item = nullptr;
int slotId = -1;
swscanf((wchar_t*)region->name,L"slot_%d",&slotId);
if(slotId < MerchantMenu::USE_ROW_SLOT_END)
- {
+ {
Slot *slot = m_menu->getSlot(slotId);
item = slot->getItem();
}