[libgee/0.8] Fix the foreach in TreeMap.values



commit 2c1d80cbe4257bfc922511fea09c99b66aa9ad70
Author: Maciej Piechotka <uzytkownik2 gmail com>
Date:   Wed Jul 24 22:41:22 2013 +0200

    Fix the foreach in TreeMap.values

 gee/treemap.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gee/treemap.vala b/gee/treemap.vala
index 2d2708a..b957aff 100644
--- a/gee/treemap.vala
+++ b/gee/treemap.vala
@@ -1714,7 +1714,7 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> {
 
                public bool foreach (ForallFunc<V> f) {
                        if (current != null) {
-                               if (!f (current.key)) {
+                               if (!f (current.value)) {
                                        return false;
                                }
                                current = current.next;
@@ -1729,7 +1729,7 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> {
                                }
                        }
                        for (; current != null; current = current.next) {
-                               if (!f (current.key)) {
+                               if (!f (current.value)) {
                                        return false;
                                }
                        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]