fix: Cleans up some string allocations from trim (#1759)
This commit is contained in:
parent
9d2f471e91
commit
d77668d77a
9 changed files with 15 additions and 22 deletions
|
|
@ -50,13 +50,7 @@ namespace Server.Gumps
|
|||
|
||||
var g = m_List[i];
|
||||
|
||||
string name;
|
||||
|
||||
if ((name = g.Name) != null && (name = name.Trim()).Length <= 0)
|
||||
{
|
||||
name = "(empty)";
|
||||
}
|
||||
|
||||
string name = g.Name?.Trim().DefaultIfNullOrEmpty("(empty)");
|
||||
AddLabel(radio ? 55 : 20, 35 + i % 11 * 30, 0, name);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue