[libgee] Add missing CompareDataFunc type arguments, fixes bug 624005
- From: Maciej Marcin Piechotka <mpiechotka src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgee] Add missing CompareDataFunc type arguments, fixes bug 624005
- Date: Mon, 6 Aug 2012 01:31:19 +0000 (UTC)
commit b3768e475a7d71af17daeb66b9151d258c4a687c
Author: Evan Nemerson <evan coeus-group com>
Date: Mon Jul 23 13:32:58 2012 -0700
Add missing CompareDataFunc type arguments, fixes bug 624005
gee/abstractlist.vala | 2 +-
gee/hashmap.vala | 4 ++--
gee/hashmultimap.vala | 6 +++---
gee/list.vala | 2 +-
gee/priorityqueue.vala | 2 +-
gee/readonlylist.vala | 2 +-
gee/timsort.vala | 2 +-
gee/treemap.vala | 4 ++--
gee/treemultimap.vala | 6 +++---
gee/treemultiset.vala | 2 +-
gee/treeset.vala | 4 ++--
11 files changed, 18 insertions(+), 18 deletions(-)
---
diff --git a/gee/abstractlist.vala b/gee/abstractlist.vala
index 61915b6..1e760f9 100644
--- a/gee/abstractlist.vala
+++ b/gee/abstractlist.vala
@@ -93,7 +93,7 @@ public abstract class Gee.AbstractList<G> : Gee.AbstractCollection<G>, List<G> {
/**
* { inheritDoc}
*/
- public void sort (owned CompareDataFunc? compare = null) {
+ public void sort (owned CompareDataFunc<G>? compare = null) {
if (compare == null) {
compare = Functions.get_compare_func_for (typeof (G));
}
diff --git a/gee/hashmap.vala b/gee/hashmap.vala
index 73fa68d..15e60f1 100644
--- a/gee/hashmap.vala
+++ b/gee/hashmap.vala
@@ -101,12 +101,12 @@ public class Gee.HashMap<K,V> : Gee.AbstractMap<K,V> {
/**
* The keys' equality testing function.
*/
- public EqualDataFunc<K> key_equal_func { private set; get; }
+ public EqualDataFunc key_equal_func { private set; get; }
/**
* The values' equality testing function.
*/
- public EqualDataFunc<V> value_equal_func { private set; get; }
+ public EqualDataFunc value_equal_func { private set; get; }
private int _array_size;
private int _nnodes;
diff --git a/gee/hashmultimap.vala b/gee/hashmultimap.vala
index 2aded45..5be67bd 100644
--- a/gee/hashmultimap.vala
+++ b/gee/hashmultimap.vala
@@ -28,13 +28,13 @@ public class Gee.HashMultiMap<K,V> : AbstractMultiMap<K,V> {
get { return ((HashMap<K, Set<V>>) _storage_map).key_hash_func; }
}
- public EqualDataFunc<K> key_equal_func {
+ public EqualDataFunc key_equal_func {
get { return ((HashMap<K, Set<V>>) _storage_map).key_equal_func; }
}
public HashDataFunc<V> value_hash_func { private set; get; }
- public EqualDataFunc<V> value_equal_func { private set; get; }
+ public EqualDataFunc value_equal_func { private set; get; }
/**
* Constructs a new, empty hash multimap.
@@ -68,7 +68,7 @@ public class Gee.HashMultiMap<K,V> : AbstractMultiMap<K,V> {
return new HashMultiSet<K> (key_hash_func, key_equal_func);
}
- protected override EqualDataFunc<V> get_value_equal_func () {
+ protected override EqualDataFunc get_value_equal_func () {
return _value_equal_func;
}
}
diff --git a/gee/list.vala b/gee/list.vala
index 0aa6502..84ebd2b 100644
--- a/gee/list.vala
+++ b/gee/list.vala
@@ -111,7 +111,7 @@ public interface Gee.List<G> : Collection<G> {
*
* @param compare_func compare function to use to compare items
*/
- public abstract void sort (owned CompareDataFunc? compare_func = null);
+ public abstract void sort (owned CompareDataFunc<G>? compare_func = null);
/**
* The read-only view of this list.
diff --git a/gee/priorityqueue.vala b/gee/priorityqueue.vala
index e40676b..92e7f01 100644
--- a/gee/priorityqueue.vala
+++ b/gee/priorityqueue.vala
@@ -72,7 +72,7 @@ public class Gee.PriorityQueue<G> : Gee.AbstractQueue<G> {
*
* @param compare_func an optional element comparator function
*/
- public PriorityQueue (owned CompareDataFunc? compare_func = null) {
+ public PriorityQueue (owned CompareDataFunc<G>? compare_func = null) {
if (compare_func == null) {
compare_func = Functions.get_compare_func_for (typeof (G));
}
diff --git a/gee/readonlylist.vala b/gee/readonlylist.vala
index b0745e6..6526c89 100644
--- a/gee/readonlylist.vala
+++ b/gee/readonlylist.vala
@@ -116,7 +116,7 @@ internal class Gee.ReadOnlyList<G> : Gee.ReadOnlyCollection<G>, List<G> {
/**
* { inheritDoc}
*/
- public void sort (owned CompareDataFunc? compare = null) {
+ public void sort (owned CompareDataFunc<G>? compare = null) {
assert_not_reached ();
}
diff --git a/gee/timsort.vala b/gee/timsort.vala
index c8e98ed..a5b9778 100644
--- a/gee/timsort.vala
+++ b/gee/timsort.vala
@@ -46,7 +46,7 @@
*/
internal class Gee.TimSort<G> : Object {
- public static void sort<G> (List<G> list, CompareDataFunc compare) {
+ public static void sort<G> (List<G> list, CompareDataFunc<G> compare) {
if (list is ArrayList) {
TimSort.sort_arraylist<G> ((ArrayList<G>) list, compare);
} else {
diff --git a/gee/treemap.vala b/gee/treemap.vala
index 8bc869e..942778c 100644
--- a/gee/treemap.vala
+++ b/gee/treemap.vala
@@ -91,7 +91,7 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> {
/**
* The keys' comparator function.
*/
- public CompareDataFunc key_compare_func { private set; get; }
+ public CompareDataFunc<K> key_compare_func { private set; get; }
/**
* The values' equality testing function.
@@ -114,7 +114,7 @@ public class Gee.TreeMap<K,V> : Gee.AbstractBidirSortedMap<K,V> {
* @param key_compare_func an optional key comparator function
* @param value_equal_func an optional values equality testing function
*/
- public TreeMap (owned CompareDataFunc? key_compare_func = null, owned EqualDataFunc? value_equal_func = null) {
+ public TreeMap (owned CompareDataFunc<K>? key_compare_func = null, owned EqualDataFunc? value_equal_func = null) {
if (key_compare_func == null) {
key_compare_func = Functions.get_compare_func_for (typeof (K));
}
diff --git a/gee/treemultimap.vala b/gee/treemultimap.vala
index 9f83d4f..4f1e772 100644
--- a/gee/treemultimap.vala
+++ b/gee/treemultimap.vala
@@ -25,11 +25,11 @@
* interface.
*/
public class Gee.TreeMultiMap<K,V> : AbstractMultiMap<K,V> {
- public CompareDataFunc key_compare_func {
+ public CompareDataFunc<K> key_compare_func {
get { return ((TreeMap<K, Set<V>>) _storage_map).key_compare_func; }
}
- public CompareDataFunc value_compare_func { private set; get; }
+ public CompareDataFunc<V> value_compare_func { private set; get; }
/**
* Constructs a new, empty tree multimap.
@@ -40,7 +40,7 @@ public class Gee.TreeMultiMap<K,V> : AbstractMultiMap<K,V> {
* @param key_compare_func an optional key comparator function
* @param value_compare_func an optional value comparator function
*/
- public TreeMultiMap (owned CompareDataFunc? key_compare_func = null, owned CompareDataFunc? value_compare_func = null) {
+ public TreeMultiMap (owned CompareDataFunc<K>? key_compare_func = null, owned CompareDataFunc<V>? value_compare_func = null) {
base (new TreeMap<K, Set<V>> (key_compare_func, Functions.get_equal_func_for (typeof (Set<V>))));
if (value_compare_func == null) {
value_compare_func = Functions.get_compare_func_for (typeof (V));
diff --git a/gee/treemultiset.vala b/gee/treemultiset.vala
index cf447da..08c35c6 100644
--- a/gee/treemultiset.vala
+++ b/gee/treemultiset.vala
@@ -25,7 +25,7 @@
* interface.
*/
public class Gee.TreeMultiSet<G> : AbstractMultiSet<G> {
- public CompareDataFunc compare_func {
+ public CompareDataFunc<G> compare_func {
get { return ((TreeMap<G, int>) _storage_map).key_compare_func; }
}
diff --git a/gee/treeset.vala b/gee/treeset.vala
index 8387b1c..34b4f10 100644
--- a/gee/treeset.vala
+++ b/gee/treeset.vala
@@ -50,7 +50,7 @@ public class Gee.TreeSet<G> : AbstractBidirSortedSet<G> {
/**
* The elements' comparator function.
*/
- public CompareDataFunc compare_func { private set; get; }
+ public CompareDataFunc<G> compare_func { private set; get; }
private int _size = 0;
@@ -63,7 +63,7 @@ public class Gee.TreeSet<G> : AbstractBidirSortedSet<G> {
*
* @param compare_func an optional element comparator function
*/
- public TreeSet (owned CompareDataFunc? compare_func = null) {
+ public TreeSet (owned CompareDataFunc<G>? compare_func = null) {
if (compare_func == null) {
compare_func = Functions.get_compare_func_for (typeof (G));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]