aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ContainerMenu.cpp
diff options
context:
space:
mode:
authorvoid_17 <heroerror3@gmail.com>2026-03-02 17:37:16 +0700
committervoid_17 <heroerror3@gmail.com>2026-03-02 17:37:16 +0700
commit119bff351450ea16ffda550b6e0f67379b29f708 (patch)
treed9f28714afd516bc2450f33b0a77c5e05ff4de90 /Minecraft.World/ContainerMenu.cpp
parent8a2a62ea1d47364f802cf9aae97668bc4a7007b5 (diff)
Revert "shared_ptr -> std::shared_ptr"
This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5.
Diffstat (limited to 'Minecraft.World/ContainerMenu.cpp')
-rw-r--r--Minecraft.World/ContainerMenu.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/Minecraft.World/ContainerMenu.cpp b/Minecraft.World/ContainerMenu.cpp
index 534da741..57190024 100644
--- a/Minecraft.World/ContainerMenu.cpp
+++ b/Minecraft.World/ContainerMenu.cpp
@@ -8,7 +8,7 @@
#include "..\Minecraft.Client\LocalPlayer.h"
#include "ContainerMenu.h"
-ContainerMenu::ContainerMenu(std::shared_ptr<Container> inventory, std::shared_ptr<Container> container) : AbstractContainerMenu()
+ContainerMenu::ContainerMenu(shared_ptr<Container> inventory, shared_ptr<Container> container) : AbstractContainerMenu()
{
this->container = container;
this->containerRows = container->getContainerSize() / 9;
@@ -37,18 +37,18 @@ ContainerMenu::ContainerMenu(std::shared_ptr<Container> inventory, std::shared_p
}
}
-bool ContainerMenu::stillValid(std::shared_ptr<Player> player)
+bool ContainerMenu::stillValid(shared_ptr<Player> player)
{
return container->stillValid(player);
}
-std::shared_ptr<ItemInstance> ContainerMenu::quickMoveStack(std::shared_ptr<Player> player, int slotIndex)
+shared_ptr<ItemInstance> ContainerMenu::quickMoveStack(shared_ptr<Player> player, int slotIndex)
{
- std::shared_ptr<ItemInstance> clicked = nullptr;
+ shared_ptr<ItemInstance> clicked = nullptr;
Slot *slot = slots->at(slotIndex);
if (slot != NULL && slot->hasItem())
{
- std::shared_ptr<ItemInstance> stack = slot->getItem();
+ shared_ptr<ItemInstance> stack = slot->getItem();
clicked = stack->copy();
if (slotIndex < containerRows * 9)
@@ -79,25 +79,25 @@ std::shared_ptr<ItemInstance> ContainerMenu::quickMoveStack(std::shared_ptr<Play
return clicked;
}
-void ContainerMenu::removed(std::shared_ptr<Player> player)
+void ContainerMenu::removed(shared_ptr<Player> player)
{
AbstractContainerMenu::removed(player);
container->stopOpen();
}
-std::shared_ptr<ItemInstance> ContainerMenu::clicked(int slotIndex, int buttonNum, int clickType, std::shared_ptr<Player> player)
+shared_ptr<ItemInstance> ContainerMenu::clicked(int slotIndex, int buttonNum, int clickType, shared_ptr<Player> player)
{
- std::shared_ptr<ItemInstance> out = AbstractContainerMenu::clicked(slotIndex, buttonNum, clickType, player);
+ shared_ptr<ItemInstance> out = AbstractContainerMenu::clicked(slotIndex, buttonNum, clickType, player);
#ifdef _EXTENDED_ACHIEVEMENTS
- std::shared_ptr<LocalPlayer> localPlayer = dynamic_pointer_cast<LocalPlayer>(player);
+ shared_ptr<LocalPlayer> localPlayer = dynamic_pointer_cast<LocalPlayer>(player);
if (localPlayer != NULL) // 4J-JEV: For "Chestful o'Cobblestone" achievement.
{
int cobblecount = 0;
for (int i = 0; i < container->getContainerSize(); i++)
{
- std::shared_ptr<ItemInstance> item = container->getItem(i);
+ shared_ptr<ItemInstance> item = container->getItem(i);
if ( (item != nullptr) && (item->id == Tile::stoneBrick_Id) )
{
cobblecount += item->GetCount();