Codechange: use the constructor for CompanyNewsItem to fill the data instead of a separate function

This commit is contained in:
rubidium42
2021-06-16 17:54:08 +02:00
committed by rubidium42
parent aa9818db90
commit 9a7750f14e
4 changed files with 14 additions and 21 deletions

View File

@@ -3231,8 +3231,7 @@ static CommandCost TownActionBuyRights(Town *t, DoCommandFlag flags)
SetWindowClassesDirty(WC_STATION_VIEW);
/* Spawn news message */
CompanyNewsInformation *cni = new CompanyNewsInformation();
cni->FillData(Company::Get(_current_company));
CompanyNewsInformation *cni = new CompanyNewsInformation(Company::Get(_current_company));
SetDParam(0, STR_NEWS_EXCLUSIVE_RIGHTS_TITLE);
SetDParam(1, STR_NEWS_EXCLUSIVE_RIGHTS_DESCRIPTION);
SetDParam(2, t->index);