fix: Fixes ValueStringBuilder empty ctor issue (#1035)
This commit is contained in:
parent
fe225003c6
commit
3b7e3c2fb7
8 changed files with 16 additions and 14 deletions
|
|
@ -22,9 +22,11 @@ public ref struct ValueStringBuilder
|
|||
get => _mt ? ArrayPool<char>.Shared : STArrayPool<char>.Shared;
|
||||
}
|
||||
|
||||
public ValueStringBuilder(bool mt = false) : this(64, mt)
|
||||
{
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ValueStringBuilder Create(int capacity = 64, bool mt = false) => new(capacity, mt);
|
||||
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static ValueStringBuilder CreateMT(int capacity = 64) => new(capacity, true);
|
||||
|
||||
// If this ctor is used, you cannot pass in stackalloc ROS for append/replace.
|
||||
public ValueStringBuilder(ReadOnlySpan<char> initialString, bool mt = false) : this(initialString.Length, mt)
|
||||
|
|
|
|||
|
|
@ -607,7 +607,7 @@ namespace Server
|
|||
Interlocked.Increment(ref _mobileCount);
|
||||
}
|
||||
|
||||
ValueStringBuilder errors = new ValueStringBuilder(true);
|
||||
using var errors = ValueStringBuilder.CreateMT();
|
||||
|
||||
try
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue