mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-26 00:45:35 +00:00
Codechange: enum-class-ify Commands
This commit is contained in:
+3
-3
@@ -167,7 +167,7 @@ public:
|
||||
Company *c = Company::GetIfValid(_local_company);
|
||||
if (c != nullptr) {
|
||||
assert(_current_company == _local_company);
|
||||
CommandCost costclear = Command<CMD_LANDSCAPE_CLEAR>::Do(DoCommandFlag::QueryCost, tile);
|
||||
CommandCost costclear = Command<Commands::LandscapeClear>::Do(DoCommandFlag::QueryCost, tile);
|
||||
if (costclear.Succeeded()) {
|
||||
Money cost = costclear.GetCost();
|
||||
StringID str;
|
||||
@@ -984,10 +984,10 @@ struct QueryStringWindow : public Window
|
||||
case WID_QS_MOVE: // Move name button
|
||||
if (Station::IsExpected(Station::Get(this->parent->window_number))) {
|
||||
/* this is a station */
|
||||
Command<CMD_MOVE_STATION_NAME>::Post(STR_ERROR_CAN_T_MOVE_STATION_NAME, CcMoveStationName, this->parent->window_number, tile);
|
||||
Command<Commands::MoveStationName>::Post(STR_ERROR_CAN_T_MOVE_STATION_NAME, CcMoveStationName, this->parent->window_number, tile);
|
||||
} else {
|
||||
/* this is a waypoint */
|
||||
Command<CMD_MOVE_WAYPOINT_NAME>::Post(STR_ERROR_CAN_T_MOVE_WAYPOINT_NAME, CcMoveWaypointName, this->parent->window_number, tile);
|
||||
Command<Commands::MoveWaypointNAme>::Post(STR_ERROR_CAN_T_MOVE_WAYPOINT_NAME, CcMoveWaypointName, this->parent->window_number, tile);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user