From 7074f35e4ba831e358117842b99ee35b87f85ae5 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 15:58:20 +0700 Subject: 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. --- Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp') diff --git a/Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp b/Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp index 39b836d2..9c556e72 100644 --- a/Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp +++ b/Minecraft.Client/Common/XUI/XUI_Scene_Container.cpp @@ -30,12 +30,12 @@ HRESULT CXuiSceneContainer::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) Minecraft *pMinecraft = Minecraft::GetInstance(); ContainerScreenInput* initData = (ContainerScreenInput*)pInitData->pvInitData; - + XuiControlSetText(m_ChestText,app.GetString(initData->container->getName())); ContainerMenu* menu = new ContainerMenu( initData->inventory, initData->container ); - shared_ptr container = initData->container; + std::shared_ptr container = initData->container; m_iPad=initData->iPad; m_bSplitscreen=initData->bSplitscreen; @@ -61,7 +61,7 @@ HRESULT CXuiSceneContainer::OnInit( XUIMessageInit* pInitData, BOOL& bHandled ) // Adjust the height to show the correct number of container rows float height, width; - this->GetBounds( &width, &height ); + this->GetBounds( &width, &height ); int rowDiff = CONTAINER_DEFAULT_ROWS - rows; //height = height - (rowDiff * ROW_HEIGHT); height = height - (rowDiff * fPointerHeight); @@ -103,7 +103,7 @@ HRESULT CXuiSceneContainer::OnDestroy() #endif // 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(Minecraft::GetInstance()->localplayers[m_iPad] != NULL) Minecraft::GetInstance()->localplayers[m_iPad]->closeContainer(); return S_OK; } @@ -156,7 +156,7 @@ void CXuiSceneContainer::InitDataAssociations(int iPad, AbstractContainerMenu *m // TODO Inventory dimensions need defined as constants m_containerControl->SetData( iPad, menu, rows, 9, 0 ); - + CXuiSceneAbstractContainer::InitDataAssociations(iPad, menu, containerSize); } -- cgit v1.2.3