[libgee] Fix the foreach in TreeMap.values



commit 27af1814c4ac4e453ade68b686a2c610934d552e
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]