diff --git a/src/mconnect/device.vala b/src/mconnect/device.vala index dcd1e44..5337af5 100644 --- a/src/mconnect/device.vala +++ b/src/mconnect/device.vala @@ -206,9 +206,9 @@ class Device : Object { cache.set_boolean(name, "paired", this.is_paired); cache.set_string(name, "certificate", this.certificate); cache.set_string_list(name, "outgoing_capabilities", - array_list_to_list(this.outgoing_capabilities)); + this.outgoing_capabilities.to_array()); cache.set_string_list(name, "incoming_capabilities", - array_list_to_list(this.incoming_capabilities)); + this.incoming_capabilities.to_array()); } private async void greet() { diff --git a/src/mconnect/utils.vala b/src/mconnect/utils.vala index 2f68d54..b3d14c5 100644 --- a/src/mconnect/utils.vala +++ b/src/mconnect/utils.vala @@ -19,22 +19,6 @@ */ using Posix; -/** - * @array_list_to_list: - * @al: Gee.ArrayList - * - * Convert Gee.ArrayList to T[] - */ -T[] array_list_to_list(Gee.ArrayList al) { - T[] out_list = new T[al.size]; - int i = 0; - foreach(var v in al) { - out_list[i] = v; - i++; - } - return out_list; -} - namespace DebugLog{ public bool Verbose = false; }