Removed NetworkReader.SeekZero because it wasn't used anymore

This commit is contained in:
vis2k 2018-08-06 20:17:53 +02:00
parent a4cce5b3c5
commit 7e574e7e39
2 changed files with 1 additions and 9 deletions

View File

@ -18,11 +18,6 @@ public NetworkReader(byte[] buffer)
public int Position { get { return (int)reader.BaseStream.Position; } set { reader.BaseStream.Position = value; } }
public int Length { get { return (int)reader.BaseStream.Length; } }
public void SeekZero()
{
reader.BaseStream.Position = 0;
}
public byte ReadByte() { return reader.ReadByte(); }
public sbyte ReadSByte() { return reader.ReadSByte(); }
public char ReadChar() { return reader.ReadChar(); }
@ -51,7 +46,7 @@ public byte[] ReadBytesAndSize()
{
// notNull? (see NetworkWriter)
bool notNull = reader.ReadBoolean();
if (notNull)
if (notNull)
{
ushort size = ReadUInt16();
return reader.ReadBytes(size);

View File

@ -158,9 +158,6 @@ public void TestWritingAndReading()
Assert.That(reader.ReadBytesAndSize(), Is.EqualTo(new byte[] { 20, 21 }));
Assert.That(reader.ReadBytesAndSize(), Is.EqualTo(new byte[] { 22, 23 }));
reader.SeekZero();
Assert.That(reader.Position, Is.Zero);
}
}
}