core: Avoid 'this' before chaining-up to other constructors
authorCyrille Chepelov <cyrille.chepelov@keyconsulting.fr>
Mon, 1 Mar 2010 13:16:06 +0000 (14:16 +0100)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Tue, 2 Mar 2010 12:43:11 +0000 (14:43 +0200)
Instead of using 'this' keyword (that will segfault as its being used
before chaining-up to other contstructor) just make copy_str_list()
static instead.

Signed-off-by: Cyrille Chepelov <cyrille.chepelov@keyconsulting.fr>
src/plugins/tracker/rygel-tracker-selection-query.vala

index 3e9825b..7f562ec 100644 (file)
@@ -57,10 +57,10 @@ public class Rygel.TrackerSelectionQuery : Rygel.TrackerQuery {
     }
 
     public TrackerSelectionQuery.clone (TrackerSelectionQuery query) {
-        this (this.copy_str_list (query.variables),
+        this (copy_str_list (query.variables),
               new TrackerQueryTriplets.clone (query.mandatory),
               new TrackerQueryTriplets.clone (query.optional),
-              this.copy_str_list (query.filters),
+              copy_str_list (query.filters),
               query.order_by,
               query.offset,
               query.max_count);
@@ -111,7 +111,7 @@ public class Rygel.TrackerSelectionQuery : Rygel.TrackerQuery {
         return query;
     }
 
-    private ArrayList<string> copy_str_list (Gee.List<string> str_list) {
+     private static ArrayList<string> copy_str_list (Gee.List<string> str_list) {
         var copy = new ArrayList<string> ();
 
         copy.add_all (str_list);