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/GiveItemCommand.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Minecraft.World/GiveItemCommand.cpp') diff --git a/Minecraft.World/GiveItemCommand.cpp b/Minecraft.World/GiveItemCommand.cpp index 076c3ade..1d13592f 100644 --- a/Minecraft.World/GiveItemCommand.cpp +++ b/Minecraft.World/GiveItemCommand.cpp @@ -10,7 +10,7 @@ EGameCommand GiveItemCommand::getId() return eGameCommand_Give; } -void GiveItemCommand::execute(std::shared_ptr source, byteArray commandData) +void GiveItemCommand::execute(shared_ptr source, byteArray commandData) { ByteArrayInputStream bais(commandData); DataInputStream dis(&bais); @@ -20,20 +20,20 @@ void GiveItemCommand::execute(std::shared_ptr source, byteArray c int amount = dis.readInt(); int aux = dis.readInt(); wstring tag = dis.readUTF(); - + bais.reset(); - std::shared_ptr player = getPlayer(uid); + shared_ptr player = getPlayer(uid); if(player != NULL && item > 0 && Item::items[item] != NULL) { - std::shared_ptr itemInstance = std::shared_ptr(new ItemInstance(item, amount, aux)); + shared_ptr itemInstance = shared_ptr(new ItemInstance(item, amount, aux)); player->drop(itemInstance); //logAdminAction(source, L"commands.give.success", ChatPacket::e_ChatCustom, Item::items[item]->getName(itemInstance), item, amount, player->getAName()); logAdminAction(source, ChatPacket::e_ChatCustom, L"commands.give.success", item, player->getAName()); } } -std::shared_ptr GiveItemCommand::preparePacket(std::shared_ptr player, int item, int amount, int aux, const wstring &tag) +shared_ptr GiveItemCommand::preparePacket(shared_ptr player, int item, int amount, int aux, const wstring &tag) { if(player == NULL) return nullptr; @@ -46,5 +46,5 @@ std::shared_ptr GiveItemCommand::preparePacket(std::shared_pt dos.writeInt(aux); dos.writeUTF(tag); - return std::shared_ptr( new GameCommandPacket(eGameCommand_Give, baos.toByteArray() )); + return shared_ptr( new GameCommandPacket(eGameCommand_Give, baos.toByteArray() )); } \ No newline at end of file -- cgit v1.2.3