diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-10-30 01:31:46 +0200 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | e740c24eb7a90bc771f5976d64d80639ee7576e5 (patch) | |
tree | b3c8f0c87419cb11c106ba1cb58d6ae0648beef4 /src/roadveh_cmd.cpp | |
parent | c88b104ec662ea80bec89f58aa7ad9d0baac7704 (diff) | |
download | openttd-e740c24eb7a90bc771f5976d64d80639ee7576e5.tar.xz |
Codechange: Template DoCommand to automagically reflect the parameters of the command proc.
When finished, this will allow each command handler to take individually
different parameters, obliviating the need for bit-packing.
Diffstat (limited to 'src/roadveh_cmd.cpp')
-rw-r--r-- | src/roadveh_cmd.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 4c8381403..efe45c507 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -35,6 +35,7 @@ #include "zoom_func.h" #include "framerate_type.h" #include "roadveh_cmd.h" +#include "road_cmd.h" #include "table/strings.h" @@ -1134,7 +1135,7 @@ static bool CanBuildTramTrackOnTile(CompanyID c, TileIndex t, RoadType rt, RoadB /* The 'current' company is not necessarily the owner of the vehicle. */ Backup<CompanyID> cur_company(_current_company, c, FILE_LINE); - CommandCost ret = DoCommand(DC_NO_WATER, CMD_BUILD_ROAD, t, rt << 4 | r, 0); + CommandCost ret = Command<CMD_BUILD_ROAD>::Do(DC_NO_WATER, t, rt << 4 | r, 0, {}); cur_company.Restore(); return ret.Succeeded(); |