projects
/
platform
/
upstream
/
libgee.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0cbe37
)
Fix the PriorityQueue.Iterator.foreach
author
Maciej Piechotka
<uzytkownik2@gmail.com>
Mon, 15 Jul 2013 17:36:51 +0000
(19:36 +0200)
committer
Maciej Piechotka
<uzytkownik2@gmail.com>
Mon, 15 Jul 2013 17:36:51 +0000
(19:36 +0200)
gee/priorityqueue.vala
patch
|
blob
|
history
diff --git
a/gee/priorityqueue.vala
b/gee/priorityqueue.vala
index
d0c5d6b
..
d6f6abe
100644
(file)
--- a/
gee/priorityqueue.vala
+++ b/
gee/priorityqueue.vala
@@
-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;
}