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

@@ -86,10 +86,8 @@ CommandCost CmdRenameSign(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
if (Utf8StringLength(text) >= MAX_LENGTH_SIGN_NAME_CHARS) return CMD_ERROR;
if (flags & DC_EXEC) {
/* Delete the old name */
free(si->name);
/* Assign the new one */
si->name = stredup(text);
si->name = text;
if (_game_mode != GM_EDITOR) si->owner = _current_company;
si->UpdateVirtCoord();