فهرست منبع

fix until #2277 is done

Nicolas Cannasse 11 سال پیش
والد
کامیت
f960c100a0
1فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 5 5
      std/StdTypes.hx

+ 5 - 5
std/StdTypes.hx

@@ -30,7 +30,7 @@
 	The standard Float type, this is a double-precision IEEE 64bit float.
 	The standard Float type, this is a double-precision IEEE 64bit float.
 	
 	
 	On static targets, null cannot be assigned to Float. If this is necessary,
 	On static targets, null cannot be assigned to Float. If this is necessary,
-	`Null<Float>` can be used instead.	
+	`Null<Float>` can be used instead.
 **/
 **/
 @:coreType @:notNull @:runtimeValue abstract Float { }
 @:coreType @:notNull @:runtimeValue abstract Float { }
 
 
@@ -50,7 +50,7 @@
 @:coreType @:notNull @:runtimeValue abstract UInt to Int from Int { }
 @:coreType @:notNull @:runtimeValue abstract UInt to Int from Int { }
 #else
 #else
 /**
 /**
-	The unsigned Int type is only defined for Flash9 and C#. 
+	The unsigned Int type is only defined for Flash9 and C#.
 	Simulate it for other platforms.
 	Simulate it for other platforms.
 **/
 **/
 abstract UInt(Int) from Int {
 abstract UInt(Int) from Int {
@@ -239,8 +239,8 @@ abstract UInt(Int) from Int {
 		return toFloat();
 		return toFloat();
 	}
 	}
 
 
-	@:to private inline function toFloat():Float {
-		var int:Int = cast this;
+	@:to /*private*/ inline function toFloat():Float {
+		var int = toInt();
 		if (int < 0) {
 		if (int < 0) {
 			return 4294967296.0 + int;
 			return 4294967296.0 + int;
 		}
 		}
@@ -249,7 +249,7 @@ abstract UInt(Int) from Int {
 		}
 		}
 	}
 	}
 
 
-	@:to private inline function toInt():Int {
+	@:to /*private*/ inline function toInt():Int {
 		return this;
 		return this;
 	}
 	}