diff options
author | frosch <frosch@openttd.org> | 2010-06-13 14:15:11 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-06-13 14:15:11 +0000 |
commit | e95518c8e9e27d2f208ba6434d3db061616d1bcd (patch) | |
tree | 0796ad27870458ef7753e6ab3548882a34d51589 /src/company_cmd.cpp | |
parent | 0270ca846eebab033e9595687a11c0f2000bb9a2 (diff) | |
download | openttd-e95518c8e9e27d2f208ba6434d3db061616d1bcd.tar.xz |
(svn r19979) -Codechange: Separate static loadable fields from Company into separate struct.
Diffstat (limited to 'src/company_cmd.cpp')
-rw-r--r-- | src/company_cmd.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp index fe3dc29a4..34def7f36 100644 --- a/src/company_cmd.cpp +++ b/src/company_cmd.cpp @@ -50,19 +50,17 @@ uint _cur_company_tick_index; ///< used to generate a name for one c CompanyPool _company_pool("Company"); INSTANTIATE_POOL_METHODS(Company) -Company::Company(uint16 name_1, bool is_ai) : - name_1(name_1), - location_of_HQ(INVALID_TILE), - is_ai(is_ai) +Company::Company(uint16 name_1, bool is_ai) { + this->name_1 = name_1; + this->location_of_HQ = INVALID_TILE; + this->is_ai = is_ai; for (uint j = 0; j < 4; j++) this->share_owners[j] = COMPANY_SPECTATOR; InvalidateWindowData(WC_PERFORMANCE_DETAIL, 0, INVALID_COMPANY); } Company::~Company() { - free(this->name); - free(this->president_name); free(this->num_engines); if (CleaningPool()) return; |