1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 01:19:11 +00:00

Codechange: Use SQInteger for generic numbers in script_league

This commit is contained in:
glx22
2023-03-04 15:50:51 +01:00
committed by Loïc Guilloux
parent 367b2ba6d1
commit 74ab9ee9dd
2 changed files with 4 additions and 4 deletions

View File

@@ -49,7 +49,7 @@
return ::LeagueTableElement::IsValidID(element_id);
}
/* static */ ScriptLeagueTable::LeagueTableElementID ScriptLeagueTable::NewElement(ScriptLeagueTable::LeagueTableID table, int64 rating, ScriptCompany::CompanyID company, Text *text, Text *score, LinkType link_type, uint32 link_target)
/* static */ ScriptLeagueTable::LeagueTableElementID ScriptLeagueTable::NewElement(ScriptLeagueTable::LeagueTableID table, SQInteger rating, ScriptCompany::CompanyID company, Text *text, Text *score, LinkType link_type, LinkTargetID link_target)
{
CCountedPtr<Text> text_counter(text);
CCountedPtr<Text> score_counter(score);
@@ -98,7 +98,7 @@
return ScriptObject::Command<CMD_UPDATE_LEAGUE_TABLE_ELEMENT_DATA>::Do(element, c, encoded_text, (::LinkType)link_type, (::LinkTargetID)link_target);
}
/* static */ bool ScriptLeagueTable::UpdateElementScore(LeagueTableElementID element, int64 rating, Text *score)
/* static */ bool ScriptLeagueTable::UpdateElementScore(LeagueTableElementID element, SQInteger rating, Text *score)
{
CCountedPtr<Text> score_counter(score);

View File

@@ -92,7 +92,7 @@ public:
* @pre score != null && len(score) != 0.
* @pre IsValidLink(Link(link_type, link_target)).
*/
static LeagueTableElementID NewElement(LeagueTableID table, int64 rating, ScriptCompany::CompanyID company, Text *text, Text *score, LinkType link_type, LinkTargetID link_target);
static LeagueTableElementID NewElement(LeagueTableID table, SQInteger rating, ScriptCompany::CompanyID company, Text *text, Text *score, LinkType link_type, LinkTargetID link_target);
/**
* Update the attributes of a league table element.
@@ -119,7 +119,7 @@ public:
* @pre IsValidLeagueTableElement(element).
* @pre score != null && len(score) != 0.
*/
static bool UpdateElementScore(LeagueTableElementID element, int64 rating, Text *score);
static bool UpdateElementScore(LeagueTableElementID element, SQInteger rating, Text *score);
/**