diff options
author | Benjamin Otte <otte@redhat.com> | 2011-11-22 03:42:31 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-11-22 03:42:31 +0100 |
commit | d8b6414567dff6365020ad397f4e61b6fe15a816 (patch) | |
tree | 066fa125d68d6332e596d212e624ab07465dfca1 /gtk/gtkrbtree.c | |
parent | ae99a9e04a5c6ac22d0d0229244c373bc5875cc1 (diff) | |
download | gtk+-d8b6414567dff6365020ad397f4e61b6fe15a816.tar.gz |
rbtree: Remove needless tests
if the checks are run on the nil node, they will get the second test the
way we expect it anyway, so it's unnecessary.
Diffstat (limited to 'gtk/gtkrbtree.c')
-rw-r--r-- | gtk/gtkrbtree.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gtk/gtkrbtree.c b/gtk/gtkrbtree.c index 9b50a1747d..ef2d735959 100644 --- a/gtk/gtkrbtree.c +++ b/gtk/gtkrbtree.c @@ -658,8 +658,8 @@ _gtk_rbtree_node_mark_valid (GtkRBTree *tree, if ((GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID)) || (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_COLUMN_INVALID)) || (node->children && GTK_RBNODE_FLAG_SET (node->children->root, GTK_RBNODE_DESCENDANTS_INVALID)) || - (!_gtk_rbtree_is_nil (node->left) && GTK_RBNODE_FLAG_SET (node->left, GTK_RBNODE_DESCENDANTS_INVALID)) || - (!_gtk_rbtree_is_nil (node->right) && GTK_RBNODE_FLAG_SET (node->right, GTK_RBNODE_DESCENDANTS_INVALID))) + (GTK_RBNODE_FLAG_SET (node->left, GTK_RBNODE_DESCENDANTS_INVALID)) || + (GTK_RBNODE_FLAG_SET (node->right, GTK_RBNODE_DESCENDANTS_INVALID))) return; GTK_RBNODE_UNSET_FLAG (node, GTK_RBNODE_DESCENDANTS_INVALID); @@ -820,8 +820,8 @@ gtk_rbtree_reorder_fixup (GtkRBTree *tree, } if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID) || - (!_gtk_rbtree_is_nil (node->right) && GTK_RBNODE_FLAG_SET (node->right, GTK_RBNODE_DESCENDANTS_INVALID)) || - (!_gtk_rbtree_is_nil (node->left) && GTK_RBNODE_FLAG_SET (node->left, GTK_RBNODE_DESCENDANTS_INVALID)) || + GTK_RBNODE_FLAG_SET (node->right, GTK_RBNODE_DESCENDANTS_INVALID) || + GTK_RBNODE_FLAG_SET (node->left, GTK_RBNODE_DESCENDANTS_INVALID) || (node->children && GTK_RBNODE_FLAG_SET (node->children->root, GTK_RBNODE_DESCENDANTS_INVALID))) GTK_RBNODE_SET_FLAG (node, GTK_RBNODE_DESCENDANTS_INVALID); else @@ -1444,8 +1444,8 @@ void _fixup_validation (GtkRBTree *tree, { if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID) || GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_COLUMN_INVALID) || - (!_gtk_rbtree_is_nil (node->left) && GTK_RBNODE_FLAG_SET (node->left, GTK_RBNODE_DESCENDANTS_INVALID)) || - (!_gtk_rbtree_is_nil (node->right) && GTK_RBNODE_FLAG_SET (node->right, GTK_RBNODE_DESCENDANTS_INVALID)) || + GTK_RBNODE_FLAG_SET (node->left, GTK_RBNODE_DESCENDANTS_INVALID) || + GTK_RBNODE_FLAG_SET (node->right, GTK_RBNODE_DESCENDANTS_INVALID) || (node->children != NULL && GTK_RBNODE_FLAG_SET (node->children->root, GTK_RBNODE_DESCENDANTS_INVALID))) { GTK_RBNODE_SET_FLAG (node, GTK_RBNODE_DESCENDANTS_INVALID); @@ -1563,8 +1563,8 @@ _gtk_rbtree_test_dirty (GtkRBTree *tree, { g_assert (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_COLUMN_INVALID) || GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_INVALID) || - (!_gtk_rbtree_is_nil (node->left) && GTK_RBNODE_FLAG_SET (node->left, GTK_RBNODE_DESCENDANTS_INVALID)) || - (!_gtk_rbtree_is_nil (node->right) && GTK_RBNODE_FLAG_SET (node->right, GTK_RBNODE_DESCENDANTS_INVALID)) || + GTK_RBNODE_FLAG_SET (node->left, GTK_RBNODE_DESCENDANTS_INVALID) || + GTK_RBNODE_FLAG_SET (node->right, GTK_RBNODE_DESCENDANTS_INVALID) || (node->children && GTK_RBNODE_FLAG_SET (node->children->root, GTK_RBNODE_DESCENDANTS_INVALID))); } else |