summaryrefslogtreecommitdiff
path: root/gee
diff options
context:
space:
mode:
authorJuerg Billeter <j@bitron.ch>2008-01-22 17:05:24 +0000
committerJürg Billeter <juergbi@src.gnome.org>2008-01-22 17:05:24 +0000
commita8c239feb74f57db1767269437cad7807fa00694 (patch)
tree880138dda6afae4885197a3bb3800fe8ac2e550c /gee
parentef79c8912ca5abd4f8aa87d85529324adbf1e12e (diff)
downloadvala-a8c239feb74f57db1767269437cad7807fa00694.tar.gz
check type of variable initializer
2008-01-22 Juerg Billeter <j@bitron.ch> * vala/valasemanticanalyzer.vala: check type of variable initializer * gee/hashmap.vala, gee/hashset.vala, vala/valasymbol.vala: fix invalid variable initializers svn path=/trunk/; revision=884
Diffstat (limited to 'gee')
-rw-r--r--gee/hashmap.vala2
-rw-r--r--gee/hashset.vala2
2 files changed, 2 insertions, 2 deletions
diff --git a/gee/hashmap.vala b/gee/hashmap.vala
index c6cd0f940..3868769b1 100644
--- a/gee/hashmap.vala
+++ b/gee/hashmap.vala
@@ -141,7 +141,7 @@ public class Gee.HashMap<K,V> : Object, Map<K,V> {
private void resize () {
if ((_array_size >= 3 * _nnodes && _array_size >= MIN_SIZE) ||
(3 * _array_size <= _nnodes && _array_size < MAX_SIZE)) {
- int new_array_size = SpacedPrimes.closest (_nnodes);
+ int new_array_size = (int) SpacedPrimes.closest (_nnodes);
new_array_size = new_array_size.clamp (MIN_SIZE, MAX_SIZE);
Node<K,V>[] new_nodes = new Node<K,V>[new_array_size];
diff --git a/gee/hashset.vala b/gee/hashset.vala
index afa674d1d..36ec34662 100644
--- a/gee/hashset.vala
+++ b/gee/hashset.vala
@@ -126,7 +126,7 @@ public class Gee.HashSet<G> : Object, Iterable<G>, Collection<G>, Set<G> {
private void resize () {
if ((_array_size >= 3 * _nnodes && _array_size >= MIN_SIZE) ||
(3 * _array_size <= _nnodes && _array_size < MAX_SIZE)) {
- int new_array_size = SpacedPrimes.closest (_nnodes);
+ int new_array_size = (int) SpacedPrimes.closest (_nnodes);
new_array_size = new_array_size.clamp (MIN_SIZE, MAX_SIZE);
Node<G>[] new_nodes = new Node<G>[new_array_size];