diff options
author | KUDr <kudr@openttd.org> | 2007-01-11 17:29:39 +0000 |
---|---|---|
committer | KUDr <kudr@openttd.org> | 2007-01-11 17:29:39 +0000 |
commit | 33be1ecfb1a9056b027d50d7b558cff87c5b744d (patch) | |
tree | d644a3831ca0947198b191fa3e4e8973d3a9786e /src/ai/ai.cpp | |
parent | 91ff74641060445dc1647bbf05baeb03b45c3099 (diff) | |
download | openttd-33be1ecfb1a9056b027d50d7b558cff87c5b744d.tar.xz |
(svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter
Diffstat (limited to 'src/ai/ai.cpp')
-rw-r--r-- | src/ai/ai.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/ai.cpp b/src/ai/ai.cpp index 5b2e5a8fc..3921fd873 100644 --- a/src/ai/ai.cpp +++ b/src/ai/ai.cpp @@ -51,11 +51,11 @@ static void AI_PutCommandInQueue(PlayerID player, TileIndex tile, uint32 p1, uin if (_ai_player[player].queue_tail == NULL) { /* There is no item in the queue yet, create the queue */ - MallocT(&_ai_player[player].queue, 1); + _ai_player[player].queue = MallocT<AICommand>(1); _ai_player[player].queue_tail = _ai_player[player].queue; } else { /* Add an item at the end */ - MallocT(&_ai_player[player].queue_tail->next, 1); + _ai_player[player].queue_tail->next = MallocT<AICommand>(1); _ai_player[player].queue_tail = _ai_player[player].queue_tail->next; } |