From bd5067b5a0705cd6bef891d2bbfed8d78616d5a6 Mon Sep 17 00:00:00 2001 From: smatz Date: Tue, 10 Jun 2008 21:59:22 +0000 Subject: (svn r13456) -Codechange: use AllocaM() macro instead of alloca() at most places --- src/roadveh_cmd.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/roadveh_cmd.cpp') 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)) { -- cgit v1.2.3-54-g00ecf