1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 07:06:30 +09:00

NetOutgoingMessage.Write(float) optimized to avoid memory allocation

This commit is contained in:
lidgren
2012-01-20 09:52:19 +00:00
parent 61ec7e3add
commit e07f7c75c9
2 changed files with 21 additions and 10 deletions

View File

@@ -49,7 +49,7 @@ namespace UnitTests
int bcnt = 0;
msg.Write(45.0f);
msg.Write(567845.0f);
msg.WriteVariableInt32(2115998022);
msg.Write(46.0);
bcnt += msg.WriteVariableInt32(-47);
@@ -94,7 +94,7 @@ namespace UnitTests
bdr.Append(inc.ReadVariableUInt32());
bdr.Append(inc.ReadVariableInt64());
if (bdr.ToString().Equals("False-342duke of earl4344True45211599802246-4747000048-49"))
if (bdr.ToString().Equals("False-342duke of earl4344True567845211599802246-4747000048-49"))
Console.WriteLine("Read/write tests OK");
else
throw new NetException("Read/write tests FAILED!");