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.
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "cmd_helper.h"
|
||||
#include "tunnelbridge_map.h"
|
||||
#include "road_gui.h"
|
||||
#include "tunnelbridge_cmd.h"
|
||||
|
||||
#include "widgets/bridge_widget.h"
|
||||
|
||||
@@ -391,7 +392,7 @@ void ShowBuildBridgeWindow(TileIndex start, TileIndex end, TransportType transpo
|
||||
/* only query bridge building possibility once, result is the same for all bridges!
|
||||
* returns CMD_ERROR on failure, and price on success */
|
||||
StringID errmsg = INVALID_STRING_ID;
|
||||
CommandCost ret = DoCommand(CommandFlagsToDCFlags(GetCommandFlags(CMD_BUILD_BRIDGE)) | DC_QUERY_COST, CMD_BUILD_BRIDGE, end, start, type);
|
||||
CommandCost ret = Command<CMD_BUILD_BRIDGE>::Do(CommandFlagsToDCFlags(GetCommandFlags<CMD_BUILD_BRIDGE>()) | DC_QUERY_COST, end, start, type, {});
|
||||
|
||||
GUIBridgeList *bl = nullptr;
|
||||
if (ret.Failed()) {
|
||||
|
Reference in New Issue
Block a user