From c8aeeec67b8600660b04141f9bf5ca01b11f0ced Mon Sep 17 00:00:00 2001 From: Michael Gratton Date: Fri, 14 Aug 2020 15:08:45 +1000 Subject: [PATCH] Sidebar.Branch: Fix compiler warning, improve code style --- src/client/sidebar/sidebar-branch.vala | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/client/sidebar/sidebar-branch.vala b/src/client/sidebar/sidebar-branch.vala index bc029934..114b2f8a 100644 --- a/src/client/sidebar/sidebar-branch.vala +++ b/src/client/sidebar/sidebar-branch.vala @@ -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(comparator_wrapper); - - bool added = children.add(child); + if (this.children == null) { + this.children = new Gee.TreeSet(comparator_wrapper); + } + this.children.add(child); } public void remove_child(Node child) {