Browse Source

device: cleanup out parameters in merge_capabilities()

bboozzoo/dbus-support
Maciek Borzecki 8 years ago
parent
commit
235578165f
1 changed files with 8 additions and 12 deletions
  1. +8
    -12
      src/mconnect/device.vala

+ 8
- 12
src/mconnect/device.vala View File

@ -500,20 +500,16 @@ class Device : Object {
caps.add_all(this.outgoing_capabilities); caps.add_all(this.outgoing_capabilities);
caps.add_all(this.incoming_capabilities); caps.add_all(this.incoming_capabilities);
if (added == null) {
added = new HashSet<string>();
added.add_all(caps);
added = new HashSet<string>();
added.add_all(caps);
// TODO: simplify capability names, eg kdeconnect.telephony.request ->
// kdeconnect.telephony
added.remove_all(this._capabilities);
}
// TODO: simplify capability names, eg kdeconnect.telephony.request ->
// kdeconnect.telephony
added.remove_all(this._capabilities);
if (removed == null) {
removed = new HashSet<string>();
removed.add_all(this._capabilities);
removed.remove_all(caps);
}
removed = new HashSet<string>();
removed.add_all(this._capabilities);
removed.remove_all(caps);
this._capabilities = caps; this._capabilities = caps;
} }


Loading…
Cancel
Save