[gnome-builder/wip/chergert/layout] symbol-tree: less error checking
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/chergert/layout] symbol-tree: less error checking
- Date: Mon, 3 Jul 2017 05:55:12 +0000 (UTC)
commit 5b7a54bf861aea029918a71ff0b117a34c25a002
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]