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
commitbd5067b5a0705cd6bef891d2bbfed8d78616d5a6 (patch)
tree1e9c70ae3dc2bbcd2c970580934f71f53844a48a /src/roadveh_cmd.cpp
parentf4153bcbde9808a31812ef30fb7e612c778d0da7 (diff)
downloadopenttd-bd5067b5a0705cd6bef891d2bbfed8d78616d5a6.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)) {