diff options
author | smatz <smatz@openttd.org> | 2009-10-09 11:03:00 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-10-09 11:03:00 +0000 |
commit | eb72a0095f39b4160be837b4e6b5758f5240efd9 (patch) | |
tree | 70f67e84529efde011bbf53eb7b33cd27fd18a19 /src/network/core/packet.cpp | |
parent | cbc6af2506b84e8c0736073af5f7e6f3719b3500 (diff) | |
download | openttd-eb72a0095f39b4160be837b4e6b5758f5240efd9.tar.xz |
(svn r17746) -Codechange: 'operator new' doesn't return NULL, NetworkSend_Init() is useless
Diffstat (limited to 'src/network/core/packet.cpp')
-rw-r--r-- | src/network/core/packet.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/network/core/packet.cpp b/src/network/core/packet.cpp index 7a43173f1..a70bd6ca0 100644 --- a/src/network/core/packet.cpp +++ b/src/network/core/packet.cpp @@ -48,20 +48,6 @@ Packet::Packet(PacketType 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 */ void Packet::PrepareToSend() |