(svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter

This commit is contained in:
KUDr
2007-01-11 17:29:39 +00:00
parent 5675956443
commit 28e969924b
49 changed files with 141 additions and 181 deletions

View File

@@ -14,8 +14,7 @@
// Add a command to the local command queue
void NetworkAddCommandQueue(NetworkClientState *cs, CommandPacket *cp)
{
CommandPacket* new_cp;
MallocT(&new_cp, 1);
CommandPacket* new_cp = MallocT<CommandPacket>(1);
*new_cp = *cp;
@@ -31,8 +30,7 @@ void NetworkAddCommandQueue(NetworkClientState *cs, CommandPacket *cp)
// Prepare a DoCommand to be send over the network
void NetworkSend_Command(TileIndex tile, uint32 p1, uint32 p2, uint32 cmd, CommandCallback *callback)
{
CommandPacket *c;
MallocT(&c, 1);
CommandPacket *c = MallocT<CommandPacket>(1);
byte temp_callback;
c->player = _local_player;