[libgee] Fix some delegate copying warnings



commit 47d7a54c84a95f0e52c90d980e5a12347ba9f2bf
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Tue Sep 12 13:40:11 2017 +0200

    Fix some delegate copying warnings

 gee/future.vala      |    2 +-
 gee/traversable.vala |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gee/future.vala b/gee/future.vala
index 982cfb9..654041b 100644
--- a/gee/future.vala
+++ b/gee/future.vala
@@ -166,7 +166,7 @@ public interface Gee.Future<G> : Object {
         */
        [CCode (ordering = 10, cname = "gee_future_light_map_fixed", vfunc_name = "light_map_fixed")]
        public virtual Future<A> light_map<A> (owned LightMapFunc<A, G> func) {
-               return new LightMapFuture<A, G> (this, func);
+               return new LightMapFuture<A, G> (this, (owned) func);
        }
 
        [CCode (ordering = 4, cname = "gee_future_light_map", vfunc_name = "light_map")]
diff --git a/gee/traversable.vala b/gee/traversable.vala
index 3fa2e7d..9dd1297 100644
--- a/gee/traversable.vala
+++ b/gee/traversable.vala
@@ -479,7 +479,7 @@ public interface Gee.Traversable<G> : Object {
         */
        [CCode (ordering = 11)]
        public virtual bool any_match (owned Predicate<G> pred) {
-               return this.first_match (pred) != null;
+               return this.first_match ((owned) pred) != null;
        }
 
        /**
@@ -554,7 +554,7 @@ public interface Gee.Traversable<G> : Object {
        public virtual Iterator<G> order_by (owned CompareDataFunc<G>? compare = null) {
                ArrayList<G> result = new ArrayList<G> ();
                this.foreach ((item) => result.add (item));
-               result.sort (compare);
+               result.sort ((owned) compare);
                return result.iterator ();
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]