Eradicate ☠ Mono ☠
Co-Authored-By: Gustas <37534529+punkpun@users.noreply.github.com>
This commit is contained in:
@@ -14,6 +14,7 @@ using System.Buffers;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenRA
|
||||
@@ -160,11 +161,7 @@ namespace OpenRA
|
||||
while ((b = s.ReadUInt8()) != 0)
|
||||
bytes.Add(b);
|
||||
|
||||
#if NET5_0_OR_GREATER
|
||||
return Encoding.ASCII.GetString(System.Runtime.InteropServices.CollectionsMarshal.AsSpan(bytes));
|
||||
#else
|
||||
return Encoding.ASCII.GetString(bytes.ToArray());
|
||||
#endif
|
||||
return Encoding.ASCII.GetString(CollectionsMarshal.AsSpan(bytes));
|
||||
}
|
||||
|
||||
public static string ReadAllText(this Stream s)
|
||||
|
||||
Reference in New Issue
Block a user