mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-24 04:34:16 +01:00
Codechange: strongly type LeagueTableID and LeagueTableElementID
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
if (!ScriptObject::Command<CMD_CREATE_LEAGUE_TABLE>::Do(&ScriptInstance::DoCommandReturnLeagueTableID, encoded_title, encoded_header, encoded_footer)) return LEAGUE_TABLE_INVALID;
|
||||
|
||||
/* In case of test-mode, we return LeagueTableID 0 */
|
||||
return static_cast<LeagueTableID>(0);
|
||||
return LeagueTableID::Begin();
|
||||
}
|
||||
|
||||
/* static */ bool ScriptLeagueTable::IsValidLeagueTableElement(LeagueTableElementID element_id)
|
||||
@@ -74,7 +74,7 @@
|
||||
if (!ScriptObject::Command<CMD_CREATE_LEAGUE_TABLE_ELEMENT>::Do(&ScriptInstance::DoCommandReturnLeagueTableElementID, table, rating, c, encoded_text, encoded_score, (::LinkType)link_type, (::LinkTargetID)link_target)) return LEAGUE_TABLE_ELEMENT_INVALID;
|
||||
|
||||
/* In case of test-mode, we return LeagueTableElementID 0 */
|
||||
return static_cast<LeagueTableElementID>(0);
|
||||
return LeagueTableElementID::Begin();
|
||||
}
|
||||
|
||||
/* static */ bool ScriptLeagueTable::UpdateElementData(LeagueTableElementID element, ScriptCompany::CompanyID company, Text *text, LinkType link_type, SQInteger link_target)
|
||||
|
||||
Reference in New Issue
Block a user