Codechange: convert C-style GetTownName API to std::string returning API

This commit is contained in:
Rubidium
2023-06-05 00:13:35 +02:00
committed by rubidium42
parent 14915526ad
commit 2dd2b698d2
4 changed files with 26 additions and 42 deletions

View File

@@ -207,9 +207,7 @@ void Town::InitializeLayout(TownLayout layout)
void Town::FillCachedName() const
{
char buf[MAX_LENGTH_TOWN_NAME_CHARS * MAX_CHAR_LENGTH];
char *end = GetTownName(buf, this, lastof(buf));
this->cached_name.assign(buf, end);
this->cached_name.assign(GetTownName(this));
}
/**