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

throw explanatory exception if trying to register callback with no sycnhronizationcontext

This commit is contained in:
lidgren
2011-07-18 21:08:08 +00:00
parent 0f66311460
commit 39459f6833
3 changed files with 6 additions and 6 deletions

View File

@@ -334,14 +334,13 @@ namespace Lidgren.Network
if ((m_readPosition & 7) == 0) // read directly
{
// endianness is handled inside BitConverter.ToSingle
float retval = BitConverter.ToSingle(m_data, m_readPosition >> 3);
m_readPosition += 32;
return retval;
}
byte[] bytes = ReadBytes(4);
return BitConverter.ToSingle(bytes, 0); // endianness is handled inside BitConverter.ToSingle
return BitConverter.ToSingle(bytes, 0);
}
/// <summary>
@@ -360,7 +359,7 @@ namespace Lidgren.Network
}
byte[] bytes = ReadBytes(8);
return BitConverter.ToDouble(bytes, 0); // endianness is handled inside BitConverter.ToSingle
return BitConverter.ToDouble(bytes, 0);
}
//