summaryrefslogtreecommitdiff
path: root/src/roadveh_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-06-10 21:59:22 +0000
committersmatz <smatz@openttd.org>2008-06-10 21:59:22 +0000
commit506cde94b66dc639f5f550849f9d8b9942832c4c (patch)
tree1e9c70ae3dc2bbcd2c970580934f71f53844a48a /src/roadveh_cmd.cpp
parent0e78f51801fd7c4af6113976d69cd7582a11a3e7 (diff)
downloadopenttd-506cde94b66dc639f5f550849f9d8b9942832c4c.tar.xz
(svn r13456) -Codechange: use AllocaM() macro instead of alloca() at most places
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r--src/roadveh_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 35fc275d5..7ecd0779b 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -194,7 +194,7 @@ CommandCost CmdBuildRoadVeh(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
uint num_vehicles = 1 + CountArticulatedParts(p1, false);
/* Allow for the front and the articulated parts, plus one to "terminate" the list. */
- Vehicle **vl = (Vehicle**)alloca(sizeof(*vl) * (num_vehicles + 1));
+ Vehicle **vl = AllocaM(Vehicle*, num_vehicles + 1);
memset(vl, 0, sizeof(*vl) * (num_vehicles + 1));
if (!Vehicle::AllocateList(vl, num_vehicles)) {