Makes gump code a little more readable (#390)

- [X] Adds a WriteAscii for individual characters
- [X] Updates gump code to use it so it is a little more readable
This commit is contained in:
Kamron Batman 2021-01-06 01:17:34 -08:00 • committed by GitHub
parent 03bdff2293
commit dfe89024ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 407 additions and 161 deletions

View file

@ -225,6 +225,9 @@ namespace System.Buffers
Position += count;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void WriteAscii(char chr) => Write((byte)chr);
public void WriteString<T>(string value, Encoding encoding, int fixedLength = -1) where T : struct, IEquatable<T>
{
int sizeT = Unsafe.SizeOf<T>();