aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ContainerSetContentPacket.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/ContainerSetContentPacket.cpp
parent8a2a62ea1d47364f802cf9aae97668bc4a7007b5 (diff)
Revert "shared_ptr -> std::shared_ptr"
This reverts commit 7074f35e4ba831e358117842b99ee35b87f85ae5.
Diffstat (limited to 'Minecraft.World/ContainerSetContentPacket.cpp')
-rw-r--r--Minecraft.World/ContainerSetContentPacket.cpp14
1 files changed, 7 insertions, 7 deletions
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<std::shared_ptr<ItemInstance> > *newItems)
+ContainerSetContentPacket::ContainerSetContentPacket(int containerId, vector<shared_ptr<ItemInstance> > *newItems)
{
this->containerId = containerId;
items = ItemInstanceArray((int)newItems->size());
for (unsigned int i = 0; i < items.length; i++)
{
- std::shared_ptr<ItemInstance> item = newItems->at(i);
+ shared_ptr<ItemInstance> 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;
}