[geary/wip/create-folders-713492: 3/4] Add iterate_array



commit dc92630e69cc7f41c128a76c5dd88a7fc1f3b1ae
Author: Charles Lindsay <chaz yorba org>
Date:   Fri Jan 31 15:55:28 2014 -0800

    Add iterate_array

 src/engine/util/util-iterable.vala |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/engine/util/util-iterable.vala b/src/engine/util/util-iterable.vala
index 4407c92..f24a518 100644
--- a/src/engine/util/util-iterable.vala
+++ b/src/engine/util/util-iterable.vala
@@ -27,6 +27,13 @@ namespace Geary {
         
         return Geary.traverse<G>(list);
     }
+    
+    /**
+     * Take an array of items and return a Geary.Iterable for convenience.
+     */
+    public Geary.Iterable<G> iterate_array(G[] a) {
+        return Geary.traverse<G>(new Gee.ArrayList<G>.wrap(a));
+    }
 }
 
 /**


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