diff options
author | rubidium42 <rubidium@openttd.org> | 2021-06-16 17:50:18 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-07-01 19:04:38 +0200 |
commit | aa9818db90b910b1b3d62d080f4a670a6a9d14af (patch) | |
tree | d3e76cefe6872f5c0b0b8edebef6cfed99f6bcab /src/economy.cpp | |
parent | df601b8559b3d5de179b5b9e65ab9674fbd8bf5e (diff) | |
download | openttd-aa9818db90b910b1b3d62d080f4a670a6a9d14af.tar.xz |
Codechange: create a type for the "free_data" of NewsItems and (de)allocate it with new and delete
Diffstat (limited to 'src/economy.cpp')
-rw-r--r-- | src/economy.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/economy.cpp b/src/economy.cpp index 7f14bed8a..cb45d55b7 100644 --- a/src/economy.cpp +++ b/src/economy.cpp @@ -580,7 +580,7 @@ static void CompanyCheckBankrupt(Company *c) /* Warn about bankruptcy after 3 months */ case 4: { - CompanyNewsInformation *cni = MallocT<CompanyNewsInformation>(1); + CompanyNewsInformation *cni = new CompanyNewsInformation(); cni->FillData(c); SetDParam(0, STR_NEWS_COMPANY_IN_TROUBLE_TITLE); SetDParam(1, STR_NEWS_COMPANY_IN_TROUBLE_DESCRIPTION); @@ -1975,7 +1975,7 @@ static void DoAcquireCompany(Company *c) { CompanyID ci = c->index; - CompanyNewsInformation *cni = MallocT<CompanyNewsInformation>(1); + CompanyNewsInformation *cni = new CompanyNewsInformation(); cni->FillData(c, Company::Get(_current_company)); SetDParam(0, STR_NEWS_COMPANY_MERGER_TITLE); |