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
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using Server.Factions;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
|
|
@ -173,7 +174,7 @@ namespace Server.Guilds
|
|||
return;
|
||||
}
|
||||
|
||||
var charter = text.Trim().FixHtml();
|
||||
var charter = text.AsSpan().Trim().FixHtml();
|
||||
|
||||
if (charter.Length > 50)
|
||||
{
|
||||
|
|
@ -193,7 +194,7 @@ namespace Server.Guilds
|
|||
return;
|
||||
}
|
||||
|
||||
var site = text.Trim().FixHtml();
|
||||
var site = text.AsSpan().Trim().FixHtml();
|
||||
|
||||
if (site.Length > 50)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
|
@ -265,7 +266,7 @@ namespace Server.Guilds
|
|||
return;
|
||||
}
|
||||
|
||||
var title = text.Trim().FixHtml();
|
||||
var title = text.AsSpan().Trim().FixHtml();
|
||||
|
||||
if (title.Length > 20)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -677,7 +677,7 @@ namespace Server.Guilds
|
|||
}
|
||||
else
|
||||
{
|
||||
var name = text.Trim().FixHtml();
|
||||
var name = text.AsSpan().Trim().FixHtml();
|
||||
|
||||
if (!CheckProfanity(name))
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue