Codechange: Make TileIndex a "strong" typedef to give it a distinct type.

This is accomplished by changing it to a single member struct with the
appropriate operator overloads to make it all work with not too much
source modifications.
This commit is contained in:
Michael Lutz
2021-11-06 23:11:22 +01:00
parent 4fc055d6e9
commit b0990fcff7
23 changed files with 160 additions and 33 deletions

View File

@@ -474,12 +474,12 @@ public:
_warn_town_no_roads = true;
}
DoCommandP(CMD_EXPAND_TOWN, STR_ERROR_CAN_T_EXPAND_TOWN, 0, this->window_number, 0);
DoCommandP(CMD_EXPAND_TOWN, STR_ERROR_CAN_T_EXPAND_TOWN, (TileIndex)0, this->window_number, 0);
break;
}
case WID_TV_DELETE: // delete town - only available on Scenario editor
DoCommandP(CMD_DELETE_TOWN, STR_ERROR_TOWN_CAN_T_DELETE, 0, this->window_number, 0);
DoCommandP(CMD_DELETE_TOWN, STR_ERROR_TOWN_CAN_T_DELETE, (TileIndex)0, this->window_number, 0);
break;
}
}