Codechange: Use std::string for most of the user-settable custom names.
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user