diff options
author | smatz <smatz@openttd.org> | 2008-06-10 21:59:22 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-06-10 21:59:22 +0000 |
commit | bd5067b5a0705cd6bef891d2bbfed8d78616d5a6 (patch) | |
tree | 1e9c70ae3dc2bbcd2c970580934f71f53844a48a /src/roadveh_cmd.cpp | |
parent | f4153bcbde9808a31812ef30fb7e612c778d0da7 (diff) | |
download | openttd-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.cpp | 2 |
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)) { |