mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
Removed NetworkReader.SeekZero because it wasn't used anymore
This commit is contained in:
parent
a4cce5b3c5
commit
7e574e7e39
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user