فهرست منبع

[JS] Make use of __js__ interpolation in haxe.ds.IntMap.keys

As per https://github.com/HaxeFoundation/haxe/issues/4707
Vadim Dyachenko 9 سال پیش
والد
کامیت
e312d85902
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> {
 	public function keys() : Iterator<Int> {
 		var a = [];
 		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();
 		return a.iterator();
 	}
 	}