Commit 265c3997 authored by Maciej (Matthew) Piechotka's avatar Maciej (Matthew) Piechotka
Browse files

Fix the PriorityQueue.Iterator.foreach

parent ea953982
......@@ -1188,15 +1188,18 @@ public class Gee.PriorityQueue<G> : Gee.AbstractQueue<G> {
stamp++;
assert (stamp == queue._stamp);
}
public bool read_only { get { return false; } }
public bool valid { get { return position != null; } }
public bool foreach (ForallFunc<G> f) {
if (position == null) {
position = (previous != null) ? previous.iter_next : queue._iter_head;
}
if (position == null) {
return true;
}
if (!f (position.data)) {
return false;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment