Codechange: Pass more std::string to StringFilter::AddLine() (#10743)

This commit is contained in:
Tyler Trahan
2023-04-30 04:23:05 -04:00
committed by GitHub
parent ee9239d293
commit ba3de0383a
10 changed files with 28 additions and 24 deletions

View File

@@ -125,11 +125,11 @@ struct Town : TownPool::PoolItem<&_town_pool> {
void UpdateVirtCoord();
inline const char *GetCachedName() const
inline const std::string &GetCachedName() const
{
if (!this->name.empty()) return this->name.c_str();
if (!this->name.empty()) return this->name;
if (this->cached_name.empty()) this->FillCachedName();
return this->cached_name.c_str();
return this->cached_name;
}
static inline Town *GetByTile(TileIndex tile)