Browse Source

allow next() to be called before hasNext()

SmerkyG 10 năm trước cách đây
mục cha
commit
b1a73110f6
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      std/flash/_std/haxe/ds/IntMap.hx

+ 2 - 2
std/flash/_std/haxe/ds/IntMap.hx

@@ -105,7 +105,7 @@ private class IntMapKeysIterator {
 	inline function new(h:flash.utils.Dictionary):Void {
 		this.h = h;
 		this.index = 0;
-		this.nextIndex = 0;
+		hasNext();
 	}
 
 	public inline function hasNext():Bool {
@@ -132,7 +132,7 @@ private class IntMapValuesIterator<T> {
 	inline function new(h:flash.utils.Dictionary):Void {
 		this.h = h;
 		this.index = 0;
-		this.nextIndex = 0;
+		hasNext();
 	}
 
 	public inline function hasNext():Bool {