StyleCop clean OrderIO

This commit is contained in:
Matthias Mailänder
2014-11-01 07:42:05 +01:00
parent 95a4248419
commit 7b22a01fc0

View File

@@ -25,24 +25,26 @@ namespace OpenRA.Network
var ms = new MemoryStream(bytes, 4, bytes.Length - 4);
var reader = new BinaryReader(ms);
var ret = new List<Order>();
while( ms.Position < ms.Length )
while (ms.Position < ms.Length)
{
var o = Order.Deserialize( world, reader );
if( o != null )
ret.Add( o );
var o = Order.Deserialize(world, reader);
if (o != null)
ret.Add(o);
}
return ret;
}
public static byte[] SerializeSync( this List<int> sync )
public static byte[] SerializeSync(this List<int> sync)
{
var ms = new MemoryStream();
using( var writer = new BinaryWriter( ms ) )
using (var writer = new BinaryWriter(ms))
{
writer.Write( (byte)0x65 );
foreach( var s in sync )
writer.Write( s );
writer.Write((byte)0x65);
foreach (var s in sync)
writer.Write(s);
}
return ms.ToArray();
}