[gnome-builder/wip/chergert/layout: 82/118] symbol-tree: less error checking



commit 7646789eeed626571b81a911345c332729a1102f
Author: Christian Hergert <chergert redhat com>
Date:   Sun Jul 2 22:54:35 2017 -0700

    symbol-tree: less error checking
    
    Dazzle can now deal with NULL parameters for these values, so
    just call it without all the error checking in the hot loop.

 plugins/symbol-tree/gbp-symbol-menu-button.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/plugins/symbol-tree/gbp-symbol-menu-button.c b/plugins/symbol-tree/gbp-symbol-menu-button.c
index 8020ea7..9cb0e9e 100644
--- a/plugins/symbol-tree/gbp-symbol-menu-button.c
+++ b/plugins/symbol-tree/gbp-symbol-menu-button.c
@@ -51,12 +51,9 @@ filter_symbols_cb (DzlTree     *tree,
                    gpointer     user_data)
 {
   DzlPatternSpec *spec = user_data;
-  const gchar *text;
-
-  if G_LIKELY (NULL != (text = dzl_tree_node_get_text (node)))
-    return dzl_pattern_spec_match (spec, text);
+  const gchar *text = dzl_tree_node_get_text (node);
 
-  return FALSE;
+  return dzl_pattern_spec_match (spec, text);
 }
 
 static void


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