1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-17 15:46:33 +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

@@ -274,13 +274,12 @@ 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);
return retval;
}
byte[] bytes = PeekBytes(4);
return BitConverter.ToSingle(bytes, 0); // endianness is handled inside BitConverter.ToSingle
return BitConverter.ToSingle(bytes, 0);
}
/// <summary>
@@ -298,7 +297,7 @@ namespace Lidgren.Network
}
byte[] bytes = PeekBytes(8);
return BitConverter.ToDouble(bytes, 0); // endianness is handled inside BitConverter.ToSingle
return BitConverter.ToDouble(bytes, 0);
}
/// <summary>