Resolves failure to build: "The name add_all_array" does not exist": Closes #7135
This commit is contained in:
parent
5806f1eae4
commit
1bfc75004d
2 changed files with 9 additions and 2 deletions
|
|
@ -13,6 +13,11 @@ public Gee.ArrayList<G> to_array_list<G>(Gee.Collection<G> c) {
|
|||
return list;
|
||||
}
|
||||
|
||||
public void add_all_array<G>(Gee.Collection<G> c, G[] ar) {
|
||||
foreach (G g in ar)
|
||||
c.add(g);
|
||||
}
|
||||
|
||||
public G? get_first<G>(Gee.Collection<G> c) {
|
||||
Gee.Iterator<G> iter = c.iterator();
|
||||
|
||||
|
|
|
|||
|
|
@ -13,9 +13,11 @@ public Gee.List<Binding>? mirror_properties(Object source, Object dest, BindingF
|
|||
flags = GLib.BindingFlags.DEFAULT | GLib.BindingFlags.SYNC_CREATE) {
|
||||
// Make sets of both object's properties.
|
||||
Gee.HashSet<ParamSpec> source_properties = new Gee.HashSet<ParamSpec>();
|
||||
source_properties.add_all_array(source.get_class().list_properties());
|
||||
Collection.add_all_array<ParamSpec>(source_properties,
|
||||
source.get_class().list_properties());
|
||||
Gee.HashSet<ParamSpec> dest_properties = new Gee.HashSet<ParamSpec>();
|
||||
dest_properties.add_all_array(dest.get_class().list_properties());
|
||||
Collection.add_all_array<ParamSpec>(dest_properties,
|
||||
dest.get_class().list_properties());
|
||||
|
||||
// Remove properties from source_properties that are not in both sets.
|
||||
source_properties.retain_all(dest_properties);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue