[geary/mjog/mail-merge-plugin: 1/9] Sidebar.Branch: Fix compiler warning, improve code style




commit acb9f92d35519e60196025d407039dac793a7ea0
Author: Michael Gratton <mike vee net>
Date:   Fri Aug 14 15:08:45 2020 +1000

    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 bc0299343..114b2f8ac 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<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) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]