(svn r17746) -Codechange: 'operator new' doesn't return NULL, NetworkSend_Init() is useless

This commit is contained in:
smatz
2009-10-09 11:03:00 +00:00
parent cbc6af2506
commit eb72a0095f
5 changed files with 40 additions and 58 deletions

View File

@@ -47,20 +47,6 @@ Packet::Packet(PacketType type)
this->buffer[this->size++] = type;
}
/**
* Create a packet for sending
* @param type the of packet
* @return the newly created packet
*/
Packet *NetworkSend_Init(PacketType type)
{
Packet *packet = new Packet(type);
/* An error is inplace here, because it simply means we ran out of memory. */
if (packet == NULL) error("Failed to allocate Packet");
return packet;
}
/**
* Writes the packet size from the raw packet from packet->size
*/