From 119bff351450ea16ffda550b6e0f67379b29f708 Mon Sep 17 00:00:00 2001 From: void_17 Date: Mon, 2 Mar 2026 17:37:16 +0700 Subject: Revert "shared_ptr -> std::shared_ptr" This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5. --- Minecraft.World/ContainerSetContentPacket.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Minecraft.World/ContainerSetContentPacket.cpp') diff --git a/Minecraft.World/ContainerSetContentPacket.cpp b/Minecraft.World/ContainerSetContentPacket.cpp index 62382888..13cfebd7 100644 --- a/Minecraft.World/ContainerSetContentPacket.cpp +++ b/Minecraft.World/ContainerSetContentPacket.cpp @@ -12,28 +12,28 @@ ContainerSetContentPacket::~ContainerSetContentPacket() delete[] items.data; } -ContainerSetContentPacket::ContainerSetContentPacket() +ContainerSetContentPacket::ContainerSetContentPacket() { containerId = 0; } -ContainerSetContentPacket::ContainerSetContentPacket(int containerId, vector > *newItems) +ContainerSetContentPacket::ContainerSetContentPacket(int containerId, vector > *newItems) { this->containerId = containerId; items = ItemInstanceArray((int)newItems->size()); for (unsigned int i = 0; i < items.length; i++) { - std::shared_ptr item = newItems->at(i); + shared_ptr item = newItems->at(i); items[i] = item == NULL ? nullptr : item->copy(); } } -void ContainerSetContentPacket::read(DataInputStream *dis) //throws IOException +void ContainerSetContentPacket::read(DataInputStream *dis) //throws IOException { containerId = dis->readByte(); int count = dis->readShort(); items = ItemInstanceArray(count); - for (int i = 0; i < count; i++) + for (int i = 0; i < count; i++) { items[i] = readItem(dis); } @@ -43,7 +43,7 @@ void ContainerSetContentPacket::write(DataOutputStream *dos) //throws IOExceptio { dos->writeByte(containerId); dos->writeShort(items.length); - for (unsigned int i = 0; i < items.length; i++) + for (unsigned int i = 0; i < items.length; i++) { writeItem(items[i], dos); } @@ -54,7 +54,7 @@ void ContainerSetContentPacket::handle(PacketListener *listener) listener->handleContainerContent(shared_from_this()); } -int ContainerSetContentPacket::getEstimatedSize() +int ContainerSetContentPacket::getEstimatedSize() { return 3 + items.length * 5; } -- cgit v1.2.3