瀏覽代碼

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.
 	
 	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 { }
 
@@ -50,7 +50,7 @@
 @:coreType @:notNull @:runtimeValue abstract UInt to Int from Int { }
 #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.
 **/
 abstract UInt(Int) from Int {
@@ -239,8 +239,8 @@ abstract UInt(Int) from Int {
 		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) {
 			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;
 	}