ソースを参照

made FastListIterator private in CPP + adds documentation for iterator()

Nicolas Cannasse 13 年 前
コミット
d4154ac421
1 ファイル変更8 行追加2 行削除
  1. 8 2
      std/haxe/FastList.hx

+ 8 - 2
std/haxe/FastList.hx

@@ -31,7 +31,7 @@ class FastCell<T> #if (flash9 || cpp) implements haxe.rtti.Generic #end {
 }
 
 #if cpp
-class FastListIterator<T> extends cpp.FastIterator<T>, implements haxe.rtti.Generic {
+private class FastListIterator<T> extends cpp.FastIterator<T>, implements haxe.rtti.Generic {
 	public var current : FastCell<T>;
 	override public function hasNext():Bool { return current!=null; }
 	override public function next():T { var result = current.elt; current = current.next; return result; }
@@ -113,10 +113,16 @@ class FastList<T> #if (flash9 || cpp) implements haxe.rtti.Generic #end {
 	}
 
 	#if cpp
+
+	/**
+		Returns an iterator on the elements of the list.
+	**/
 	public function iterator() : Iterator<T> {
 		return new FastListIterator<T>(head);
 	}
-   #else
+
+	#else
+
 	/**
 		Returns an iterator on the elements of the list.
 	**/