diff options
author | Matthias Berndt <matthias_berndt@gmx.de> | 2016-09-29 01:42:29 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2016-09-29 15:30:17 +0200 |
commit | 77ce16886468dd3118534988f74710183c042fec (patch) | |
tree | d0bceff9c52c1d0391a629327e463523d19c9cf9 | |
parent | dea939e1f7e6ed3e512bddf46e384283cbdacd1e (diff) | |
download | libgee-77ce16886468dd3118534988f74710183c042fec.tar.gz |
Fix overrides with non-matching types
https://bugzilla.gnome.org/show_bug.cgi?id=772149
-rw-r--r-- | gee/abstractmultimap.vala | 2 | ||||
-rw-r--r-- | gee/hashset.vala | 2 | ||||
-rw-r--r-- | gee/priorityqueue.vala | 2 | ||||
-rw-r--r-- | gee/readonlycollection.vala | 4 | ||||
-rw-r--r-- | gee/treemap.vala | 12 |
5 files changed, 11 insertions, 11 deletions
diff --git a/gee/abstractmultimap.vala b/gee/abstractmultimap.vala index 9542d1a..af60470 100644 --- a/gee/abstractmultimap.vala +++ b/gee/abstractmultimap.vala @@ -162,7 +162,7 @@ public abstract class Gee.AbstractMultiMap<K,V> : Object, MultiMap<K,V> { _multi_map = multi_map; } - public override Gee.Iterator<K> iterator () { + public override Gee.Iterator<V> iterator () { return new ValueIterator<K, V> (_multi_map._storage_map.map_iterator ()); } diff --git a/gee/hashset.vala b/gee/hashset.vala index 076f8c5..230f564 100644 --- a/gee/hashset.vala +++ b/gee/hashset.vala @@ -222,7 +222,7 @@ public class Gee.HashSet<G> : AbstractSet<G> { /** * {@inheritDoc} */ - public override bool foreach (ForallFunc f) { + public override bool foreach (ForallFunc<G> f) { for (int i = 0; i < _array_size; i++) { for (unowned Node<G>? current = _nodes[i]; current != null; current = current.next) { if (!f (current.key)) { diff --git a/gee/priorityqueue.vala b/gee/priorityqueue.vala index 43a60c4..31be4ab 100644 --- a/gee/priorityqueue.vala +++ b/gee/priorityqueue.vala @@ -377,7 +377,7 @@ public class Gee.PriorityQueue<G> : Gee.AbstractQueue<G> { /** * {@inheritDoc} */ - public override bool foreach (ForallFunc f) { + public override bool foreach (ForallFunc<G> f) { for (unowned Node<G>? current = _iter_head; current != null; current = current.iter_next) { if (!f (current.data)) { return false; diff --git a/gee/readonlycollection.vala b/gee/readonlycollection.vala index 0702bf7..a1be7a1 100644 --- a/gee/readonlycollection.vala +++ b/gee/readonlycollection.vala @@ -77,7 +77,7 @@ internal class Gee.ReadOnlyCollection<G> : Object, Traversable<G>, Iterable<G>, /** * {@inheritDoc} */ - public Gee.Iterator<A> stream<A> (owned StreamFunc<A> f) { + public Gee.Iterator<A> stream<A> (owned StreamFunc<G, A> f) { return _collection.stream<A> ((owned)f); } @@ -215,7 +215,7 @@ internal class Gee.ReadOnlyCollection<G> : Object, Traversable<G>, Iterable<G>, return _iter.foreach (f); } - public Gee.Iterator<A> stream<A> (owned StreamFunc<A, G> f) { + public Gee.Iterator<A> stream<A> (owned StreamFunc<G, A> f) { return _iter.stream<A> ((owned)f); } diff --git a/gee/treemap.vala b/gee/treemap.vala index c8db122..d151d27 100644 --- a/gee/treemap.vala +++ b/gee/treemap.vala @@ -887,7 +887,7 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> { } } - public override SortedSet<K> ascending_entries { + public override SortedSet<Map.Entry<K, V>> ascending_entries { owned get { var entries = _entries; if (_entries == null) { @@ -1262,7 +1262,7 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> { return new SubEntrySet<K,V> (_map, new Range<K,V>.tail (_map, after.key)); } - public override SortedSet<K> sub_set (Map.Entry<K, V> after, Map.Entry<K, V> before) { + public override SortedSet<Map.Entry<K, V>> sub_set (Map.Entry<K, V> after, Map.Entry<K, V> before) { return new SubEntrySet<K,V> (_map, new Range<K,V> (_map, after.key, before.key)); } @@ -1343,7 +1343,7 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> { return range.in_range(entry.key) && map.has (entry.key, entry.value); } - public override BidirIterator<K> bidir_iterator () { + public override BidirIterator<Map.Entry<K, V>> bidir_iterator () { return new SubEntryIterator<K,V> (map, range); } @@ -1359,15 +1359,15 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> { return Entry.entry_for<K,V> (_last); } - public override SortedSet<K> head_set (Map.Entry<K,V> before) { + public override SortedSet<Map.Entry<K, V>> head_set (Map.Entry<K,V> before) { return new SubEntrySet<K,V> (map, range.cut_tail (before.key)); } - public override SortedSet<K> tail_set (Map.Entry<K,V> after) { + public override SortedSet<Map.Entry<K, V>> tail_set (Map.Entry<K,V> after) { return new SubEntrySet<K,V> (map, range.cut_head (after.key)); } - public override SortedSet<K> sub_set (Map.Entry<K,V> after, Map.Entry<K,V> before) { + public override SortedSet<Map.Entry<K, V>> sub_set (Map.Entry<K,V> after, Map.Entry<K,V> before) { return new SubEntrySet<K,V> (map, range.cut (after.key, before.key)); } |