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.
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
|
||||
|
||||
|
||||
SetCarriedItemPacket::SetCarriedItemPacket()
|
||||
SetCarriedItemPacket::SetCarriedItemPacket()
|
||||
{
|
||||
slot = 0;
|
||||
}
|
||||
|
||||
SetCarriedItemPacket::SetCarriedItemPacket(int slot)
|
||||
SetCarriedItemPacket::SetCarriedItemPacket(int slot)
|
||||
{
|
||||
this->slot = slot;
|
||||
}
|
||||
@@ -21,27 +21,27 @@ void SetCarriedItemPacket::read(DataInputStream *dis) //throws IOException
|
||||
slot = dis->readShort();
|
||||
}
|
||||
|
||||
void SetCarriedItemPacket::write(DataOutputStream *dos) //throws IOException
|
||||
void SetCarriedItemPacket::write(DataOutputStream *dos) //throws IOException
|
||||
{
|
||||
dos->writeShort(slot);
|
||||
}
|
||||
|
||||
void SetCarriedItemPacket::handle(PacketListener *listener)
|
||||
void SetCarriedItemPacket::handle(PacketListener *listener)
|
||||
{
|
||||
listener->handleSetCarriedItem(shared_from_this());
|
||||
}
|
||||
|
||||
int SetCarriedItemPacket::getEstimatedSize()
|
||||
int SetCarriedItemPacket::getEstimatedSize()
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
bool SetCarriedItemPacket::canBeInvalidated()
|
||||
bool SetCarriedItemPacket::canBeInvalidated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool SetCarriedItemPacket::isInvalidatedBy(shared_ptr<Packet> packet)
|
||||
bool SetCarriedItemPacket::isInvalidatedBy(std::shared_ptr<Packet> packet)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user