Fix all of the nullable issues
This commit is contained in:
1 parent
9d97ad0975
commit
30feb15821
13 files changed
+58
-53
No files matched your search
@@ -46,10 +46,10 @@ namespace Mistox {
|
||||
return writer.WrittenSpan.ToArray();
|
||||
}
|
||||
|
||||
public static object Deserialize( DataPacketHeader Header, ReadOnlyMemory<byte> Data ) {
|
||||
public static object? Deserialize( DataPacketHeader Header, ReadOnlyMemory<byte> Data ) {
|
||||
|
||||
// Get the type from the tag
|
||||
if (!NetworkPacketDictionary.PacketLookupTable.TryGetValue(Header.Type, out Type resolvedType)) {
|
||||
if (!NetworkPacketDictionary.PacketLookupTable.TryGetValue(Header.Type, out Type? resolvedType)) {
|
||||
throw new Exception($"Unknown packet type ID: {Header.Type}");
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user