From 28e969924b9033f5132fe2ba223e2bcadd39a7ec Mon Sep 17 00:00:00 2001 From: KUDr Date: Thu, 11 Jan 2007 17:29:39 +0000 Subject: (svn r8066) - Codechange: MallocT(), CallocT(), ReallocT() now return the pointer to allocated memory instead of modifying the pointer given as parameter --- src/ai/default/default.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/ai/default') diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index fff5cef8a..09e2f68a4 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -3575,7 +3575,6 @@ return_to_loop:; static void AiStateRemoveStation(Player *p) { // Remove stations that aren't in use by any vehicle - byte *in_use; const Order *ord; const Station *st; TileIndex tile; @@ -3584,7 +3583,7 @@ static void AiStateRemoveStation(Player *p) p->ai.state = AIS_1; // Get a list of all stations that are in use by a vehicle - MallocT(&in_use, GetMaxStationIndex() + 1); + byte *in_use = MallocT(GetMaxStationIndex() + 1); memset(in_use, 0, GetMaxStationIndex() + 1); FOR_ALL_ORDERS(ord) { if (ord->type == OT_GOTO_STATION) in_use[ord->dest] = 1; -- cgit v1.2.3-54-g00ecf