Browse Source

device, utils: remove unnecessary helper array_list_to_list()

bboozzoo/dbus-support-fileshare
Maciek Borzecki 8 years ago
parent
commit
1ad268a6ee
2 changed files with 2 additions and 18 deletions
  1. +2
    -2
      src/mconnect/device.vala
  2. +0
    -16
      src/mconnect/utils.vala

+ 2
- 2
src/mconnect/device.vala View File

@ -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() {


+ 0
- 16
src/mconnect/utils.vala View File

@ -19,22 +19,6 @@
*/
using Posix;
/**
* @array_list_to_list:
* @al: Gee.ArrayList<T>
*
* Convert Gee.ArrayList<T> to T[]
*/
T[] array_list_to_list<T>(Gee.ArrayList<T> 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;
}


Loading…
Cancel
Save