Skip to content

Commit 2c49f46

Browse files
update
Based on suggestion from Emma, removing InBitwiseContext check since this is done in both ReadLengthSafe and TryBeginReadInternal.
1 parent 0db2eb6 commit 2c49f46

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

com.unity.netcode.gameobjects/Runtime/Serialization/FastBufferReader.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -646,14 +646,6 @@ public unsafe void ReadValue(out string s, bool oneByteChars = false)
646646
/// <param name="oneByteChars">If false(default) 2 byte characters and if true 1 byte characters.</param>
647647
public unsafe void ReadValueSafe(out string s, bool oneByteChars = false)
648648
{
649-
#if DEBUG
650-
if (Handle->InBitwiseContext)
651-
{
652-
throw new InvalidOperationException(
653-
"Cannot use BufferReader in bytewise mode while in a bitwise context.");
654-
}
655-
#endif
656-
657649
ReadLengthSafe(out int length);
658650

659651
// Validate the string's byte count based on the character count and if it is valid begin reading based on the returned

0 commit comments

Comments
 (0)