diff options
author | rubidium42 <rubidium@openttd.org> | 2021-06-16 17:54:08 +0200 |
---|---|---|
committer | rubidium42 <rubidium42@users.noreply.github.com> | 2021-07-01 19:04:38 +0200 |
commit | 9a7750f14eccd8afb6e8bb608ec421c09a486d53 (patch) | |
tree | e77f49a9225f414939961fd5b2794147b2aa25f6 /src/town_cmd.cpp | |
parent | aa9818db90b910b1b3d62d080f4a670a6a9d14af (diff) | |
download | openttd-9a7750f14eccd8afb6e8bb608ec421c09a486d53.tar.xz |
Codechange: use the constructor for CompanyNewsItem to fill the data instead of a separate function
Diffstat (limited to 'src/town_cmd.cpp')
-rw-r--r-- | src/town_cmd.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index b21d0ab71..d53cd5783 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -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); |