Ver Fonte

Merge pull request #3754 from proletariatgames/development

[cs] Remove unnecessary GC allocation inside Null.
Dan Korostelev há 10 anos atrás
pai
commit
3536be04bc
1 ficheiros alterados com 1 adições e 1 exclusões
  1. 1 1
      std/cs/internal/Null.hx

+ 1 - 1
std/cs/internal/Null.hx

@@ -47,7 +47,7 @@ package cs.internal;
 	@:readOnly public var hasValue(default,never):Bool;
 
 	@:functionCode('
-			if ( !(v is System.ValueType) && System.Object.ReferenceEquals(v, default(T)))
+			if (!typeof(T).IsValueType && System.Object.ReferenceEquals(v, default(T)))
 			{
 				hasValue = false;
 			}