Browse Source

Minor change to default event assignment

NX 6 years ago
parent
commit
545954940b
1 changed files with 3 additions and 3 deletions
  1. 3 3
      Source/Managed/ENet.cs

+ 3 - 3
Source/Managed/ENet.cs

@@ -556,7 +556,7 @@ namespace ENet {
 			var result = Native.enet_host_check_events(nativeHost, out nativeEvent);
 			var result = Native.enet_host_check_events(nativeHost, out nativeEvent);
 
 
 			if (result <= 0) {
 			if (result <= 0) {
-				@event = new Event();
+				@event = default(Event);
 
 
 				return result;
 				return result;
 			}
 			}
@@ -598,7 +598,7 @@ namespace ENet {
 			var result = Native.enet_host_service(nativeHost, out nativeEvent, (uint)timeout);
 			var result = Native.enet_host_service(nativeHost, out nativeEvent, (uint)timeout);
 
 
 			if (result <= 0) {
 			if (result <= 0) {
-				@event = new Event();
+				@event = default(Event);
 
 
 				return result;
 				return result;
 			}
 			}
@@ -1079,4 +1079,4 @@ namespace ENet {
 		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
 		[DllImport(nativeLibrary, CallingConvention = CallingConvention.Cdecl)]
 		internal static extern void enet_peer_reset(IntPtr peer);
 		internal static extern void enet_peer_reset(IntPtr peer);
 	}
 	}
-}
+}