[rygel] tracker: Avoid copying of triplets when possible



commit dd821c09cc319933a8abaed3ee60ce2577264b61
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Mon Nov 30 16:46:31 2009 +0200

    tracker: Avoid copying of triplets when possible

 .../tracker/rygel-tracker-search-container.vala    |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/plugins/tracker/rygel-tracker-search-container.vala b/src/plugins/tracker/rygel-tracker-search-container.vala
index d7ff4d8..06118b2 100644
--- a/src/plugins/tracker/rygel-tracker-search-container.vala
+++ b/src/plugins/tracker/rygel-tracker-search-container.vala
@@ -53,9 +53,11 @@ public class Rygel.TrackerSearchContainer : Rygel.MediaContainer {
         var variables = new ArrayList<string> ();
         variables.add (ITEM_VARIABLE);
 
-        var our_mandatory = new TrackerQueryTriplets ();
+        TrackerQueryTriplets our_mandatory;
         if (mandatory != null) {
-            our_mandatory.add_all (mandatory);
+            our_mandatory = mandatory;
+        } else {
+            our_mandatory = new TrackerQueryTriplets ();
         }
 
         our_mandatory.add (new TrackerQueryTriplet (ITEM_VARIABLE,



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