From b8babe694859fe02a6113c4b7ab3cc2a8b3649b2 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Wed, 14 Sep 2016 08:12:12 +0200 Subject: Fix 'static const' warnings with vala 0.33.1 --- gee/concurrentset.vala | 2 +- gee/queue.vala | 2 +- gee/timsort.vala | 2 +- gee/unrolledlinkedlist.vala | 6 +++--- tests/testarraylist.vala | 2 +- tests/testdata.vala | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gee/concurrentset.vala b/gee/concurrentset.vala index 5a642ae..a82051d 100644 --- a/gee/concurrentset.vala +++ b/gee/concurrentset.vala @@ -248,7 +248,7 @@ public class Gee.ConcurrentSet : AbstractSortedSet { private int _size = 0; private Tower _head = new Tower.head (); private CompareDataFunc? _cmp; - private static const int _MAX_HEIGHT = 31; + private const int _MAX_HEIGHT = 31; private static Private rand = new Private((ptr) => { Rand *rnd = (Rand *)ptr; delete rnd; diff --git a/gee/queue.vala b/gee/queue.vala index 90f3cc0..8de6864 100644 --- a/gee/queue.vala +++ b/gee/queue.vala @@ -49,7 +49,7 @@ public interface Gee.Queue : Collection { /** * The unbounded capacity value. */ - public static const int UNBOUNDED_CAPACITY = -1; + public const int UNBOUNDED_CAPACITY = -1; /** * The capacity of this queue (or ``UNBOUNDED_CAPACITY`` if capacity is not bound). diff --git a/gee/timsort.vala b/gee/timsort.vala index ad1e52e..d3c5ae9 100644 --- a/gee/timsort.vala +++ b/gee/timsort.vala @@ -85,7 +85,7 @@ internal class Gee.TimSort : Object { helper.do_sort (); } - private static const int MINIMUM_GALLOP = 7; + private const int MINIMUM_GALLOP = 7; private List list_collection; private G[] array; diff --git a/gee/unrolledlinkedlist.vala b/gee/unrolledlinkedlist.vala index c6aac66..e36f88f 100644 --- a/gee/unrolledlinkedlist.vala +++ b/gee/unrolledlinkedlist.vala @@ -720,9 +720,9 @@ public class Gee.UnrolledLinkedList : AbstractBidirList, Queue, Deque? _head = null; private unowned Node? _tail = null; private Functions.EqualDataFuncClosure _equal_func; - private static const int NODE_SIZE = 29; // Chosen for node to be multiply cache line (4 on 64 bit and 2 on 32 bit) - private static const int SPLIT_POS = (NODE_SIZE - 1)/2 + 1; - private static const int MERGE_THRESHOLD = (NODE_SIZE * 4)/5; + private const int NODE_SIZE = 29; // Chosen for node to be multiply cache line (4 on 64 bit and 2 on 32 bit) + private const int SPLIT_POS = (NODE_SIZE - 1)/2 + 1; + private const int MERGE_THRESHOLD = (NODE_SIZE * 4)/5; private class Iterator : Object, Gee.Traversable, Gee.Iterator, ListIterator, BidirIterator, BidirListIterator { public Iterator (UnrolledLinkedList list) { diff --git a/tests/testarraylist.vala b/tests/testarraylist.vala index 381740e..40809aa 100644 --- a/tests/testarraylist.vala +++ b/tests/testarraylist.vala @@ -35,7 +35,7 @@ public class ArrayListTests : BidirListTests { add_test ("[ArrayList] typed to_array calls", test_typed_to_array); } - private static const int BIG_SORT_SIZE = 1000000; + private const int BIG_SORT_SIZE = 1000000; public override void set_up () { test_collection = new ArrayList (); diff --git a/tests/testdata.vala b/tests/testdata.vala index e69a970..6ec2771 100644 --- a/tests/testdata.vala +++ b/tests/testdata.vala @@ -30,7 +30,7 @@ public class TestData { } private static uint DATA_SIZE = data_size (); - private static const uint RND_IDX_SIZE = 8; + private const uint RND_IDX_SIZE = 8; private static string[] data = create_data (DATA_SIZE); private static string[] sorted_data = sort_array (data); -- cgit v1.2.1