From 2f0bbe8987e5eb1390b23ac531c971b202c2ef77 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Thu, 13 Apr 2023 23:43:03 +0200 Subject: Implementations of "G List.get()" should use non-nullable return as defined --- gee/abstractlist.vala | 2 +- gee/concurrentlist.vala | 2 +- gee/readonlylist.vala | 2 +- gee/unrolledlinkedlist.vala | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gee/abstractlist.vala b/gee/abstractlist.vala index eeff984..1e55114 100644 --- a/gee/abstractlist.vala +++ b/gee/abstractlist.vala @@ -39,7 +39,7 @@ public abstract class Gee.AbstractList : Gee.AbstractCollection, List { /** * {@inheritDoc} */ - public abstract new G? get (int index); + public abstract new G get (int index); /** * {@inheritDoc} diff --git a/gee/concurrentlist.vala b/gee/concurrentlist.vala index 6e511f1..583f827 100644 --- a/gee/concurrentlist.vala +++ b/gee/concurrentlist.vala @@ -170,7 +170,7 @@ public class Gee.ConcurrentList : AbstractList { /** * {@inheritDoc} */ - public override G? get (int index) { + public override G get (int index) { HazardPointer.Context ctx = new HazardPointer.Context (); Utils.Misc.unused (ctx); assert (index >= 0); diff --git a/gee/readonlylist.vala b/gee/readonlylist.vala index 8be3f27..c243d14 100644 --- a/gee/readonlylist.vala +++ b/gee/readonlylist.vala @@ -74,7 +74,7 @@ internal class Gee.ReadOnlyList : Gee.ReadOnlyCollection, List { /** * {@inheritDoc} */ - public new G? get (int index) { + public new G get (int index) { return ((Gee.List) _collection).get (index); } diff --git a/gee/unrolledlinkedlist.vala b/gee/unrolledlinkedlist.vala index e36f88f..234d24d 100644 --- a/gee/unrolledlinkedlist.vala +++ b/gee/unrolledlinkedlist.vala @@ -158,7 +158,7 @@ public class Gee.UnrolledLinkedList : AbstractBidirList, Queue, Deque (this); } - public override G? get (int index) { + public override G get (int index) { assert (index >= 0); assert (index < this._size); -- cgit v1.2.1