Codechange: Use std::string for most of the user-settable custom names.

This commit is contained in:
Michael Lutz
2020-05-17 23:31:59 +02:00
parent 9b6f5e3bb8
commit 63ccb36ef3
41 changed files with 160 additions and 177 deletions

View File

@@ -97,7 +97,7 @@ bool VerifyTownName(uint32 r, const TownNameParams *par, TownNames *town_names)
for (const Town *t : Town::Iterate()) {
/* We can't just compare the numbers since
* several numbers may map to a single name. */
const char *buf = t->name;
const char *buf = t->name.empty() ? nullptr : t->name.c_str();
if (buf == nullptr) {
GetTownName(buf2, t, lastof(buf2));
buf = buf2;