mirror of https://github.com/OpenTTD/OpenTTD
Codefix: Company name is a StringID. (#13224)
StringID was passed to Company's constructor as a uint16_t.pull/13227/head
parent
31fd71e1ac
commit
e9e603b4fd
|
@ -131,7 +131,7 @@ struct CompanyProperties {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Company : CompanyProperties, CompanyPool::PoolItem<&_company_pool> {
|
struct Company : CompanyProperties, CompanyPool::PoolItem<&_company_pool> {
|
||||||
Company(uint16_t name_1 = 0, bool is_ai = false);
|
Company(StringID name_1 = STR_NULL, bool is_ai = false);
|
||||||
~Company();
|
~Company();
|
||||||
|
|
||||||
RailTypes avail_railtypes; ///< Rail types available to this company.
|
RailTypes avail_railtypes; ///< Rail types available to this company.
|
||||||
|
|
|
@ -63,7 +63,7 @@ INSTANTIATE_POOL_METHODS(Company)
|
||||||
* @param name_1 Name of the company.
|
* @param name_1 Name of the company.
|
||||||
* @param is_ai A computer program is running for this company.
|
* @param is_ai A computer program is running for this company.
|
||||||
*/
|
*/
|
||||||
Company::Company(uint16_t name_1, bool is_ai)
|
Company::Company(StringID name_1, bool is_ai)
|
||||||
{
|
{
|
||||||
this->name_1 = name_1;
|
this->name_1 = name_1;
|
||||||
this->location_of_HQ = INVALID_TILE;
|
this->location_of_HQ = INVALID_TILE;
|
||||||
|
|
|
@ -1025,7 +1025,7 @@ static bool LoadOldCompany(LoadgameState *ls, int num)
|
||||||
|
|
||||||
if (num == 0) {
|
if (num == 0) {
|
||||||
/* If the first company has no name, make sure we call it UNNAMED */
|
/* If the first company has no name, make sure we call it UNNAMED */
|
||||||
if (c->name_1 == 0) {
|
if (c->name_1 == STR_NULL) {
|
||||||
c->name_1 = STR_SV_UNNAMED;
|
c->name_1 = STR_SV_UNNAMED;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue