Sidebar.Branch: Fix compiler warning, improve code style

This commit is contained in:
Michael Gratton 2020-08-14 15:08:45 +10:00 committed by Michael James Gratton
parent 4404496ad4
commit c8aeeec67b

View file

@ -63,11 +63,10 @@ public class Sidebar.Branch : Geary.BaseObject {
public void add_child(Node child) {
child.parent = this;
if (children == null)
children = new Gee.TreeSet<Node>(comparator_wrapper);
bool added = children.add(child);
if (this.children == null) {
this.children = new Gee.TreeSet<Node>(comparator_wrapper);
}
this.children.add(child);
}
public void remove_child(Node child) {