Codechange: explicitly initialise Subsidy member variables
This commit is contained in:
@@ -201,12 +201,7 @@ static bool CheckSubsidyDistance(Source src, Source dst)
|
||||
*/
|
||||
void CreateSubsidy(CargoType cargo_type, Source src, Source dst)
|
||||
{
|
||||
Subsidy *s = new Subsidy();
|
||||
s->cargo_type = cargo_type;
|
||||
s->src = src;
|
||||
s->dst = dst;
|
||||
s->remaining = SUBSIDY_OFFER_MONTHS;
|
||||
s->awarded = CompanyID::Invalid();
|
||||
Subsidy *s = new Subsidy(cargo_type, src, dst, SUBSIDY_OFFER_MONTHS);
|
||||
|
||||
std::pair<NewsReference, NewsReference> references = SetupSubsidyDecodeParam(s, SubsidyDecodeParamType::NewsOffered);
|
||||
AddNewsItem(STR_NEWS_SERVICE_SUBSIDY_OFFERED, NewsType::Subsidies, NewsStyle::Normal, {}, references.first, references.second);
|
||||
|
||||
Reference in New Issue
Block a user