浏览代码

Merge pull request #4708 from YellowAfterlife/patch-1

[JS] Make use of __js__ interpolation in haxe.ds.IntMap.keys
Dan Korostelev 9 年之前
父节点
当前提交
54aa692501
共有 1 个文件被更改,包括 1 次插入6 次删除
  1. 1 6
      std/js/_std/haxe/ds/IntMap.hx

+ 1 - 6
std/js/_std/haxe/ds/IntMap.hx

@@ -49,12 +49,7 @@ package haxe.ds;
 
 	public function keys() : Iterator<Int> {
 		var a = [];
-		untyped {
-			__js__("for( var key in this.h ) {");
-				if( h.hasOwnProperty(key) )
-					a.push(key|0);
-			__js__("}");
-		}
+		untyped __js__("for( var key in {0} ) {1}", h, if( h.hasOwnProperty(key) ) a.push(key|0));
 		return a.iterator();
 	}