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

FxCop issues fixed; dead code removed

This commit is contained in:
lidgren
2013-02-24 13:40:30 +00:00
parent 84f892c1f0
commit 14f20ace0e
9 changed files with 20 additions and 785 deletions

View File

@@ -601,32 +601,14 @@ namespace Lidgren.Network
/// <summary>
/// Append all the bits of message to this message
/// </summary>
public void Write(NetOutgoingMessage message)
public void Write(NetBuffer buffer)
{
EnsureBufferSize(m_bitLength + (message.LengthBytes * 8));
EnsureBufferSize(m_bitLength + (buffer.LengthBytes * 8));
Write(message.m_data, 0, message.LengthBytes);
Write(buffer.m_data, 0, buffer.LengthBytes);
// did we write excessive bits?
int bitsInLastByte = (message.m_bitLength % 8);
if (bitsInLastByte != 0)
{
int excessBits = 8 - bitsInLastByte;
m_bitLength -= excessBits;
}
}
/// <summary>
/// Append all the bits of message to this message
/// </summary>
public void Write(NetIncomingMessage message)
{
EnsureBufferSize(m_bitLength + (message.LengthBytes * 8));
Write(message.m_data, 0, message.LengthBytes);
// did we write excessive bits?
int bitsInLastByte = (message.m_bitLength % 8);
int bitsInLastByte = (buffer.m_bitLength % 8);
if (bitsInLastByte != 0)
{
int excessBits = 8 - bitsInLastByte;