[gtk+] rbtree: Add assertions to clarify usage
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] rbtree: Add assertions to clarify usage
- Date: Mon, 21 Nov 2011 21:36:10 +0000 (UTC)
commit 6168a64713a9eb670db8e2e054e48c524553ea1b
Author: Benjamin Otte <otte redhat com>
Date: Mon Nov 21 19:51:39 2011 +0100
rbtree: Add assertions to clarify usage
gtk/gtkrbtree.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkrbtree.c b/gtk/gtkrbtree.c
index 53faea2..279df20 100644
--- a/gtk/gtkrbtree.c
+++ b/gtk/gtkrbtree.c
@@ -472,6 +472,7 @@ _gtk_rbtree_insert_after (GtkRBTree *tree,
}
else
{
+ g_assert (tree->root == tree->nil);
tree->root = node;
tmp_node = tree->parent_node;
tmp_tree = tree->parent_tree;
@@ -558,6 +559,7 @@ _gtk_rbtree_insert_before (GtkRBTree *tree,
}
else
{
+ g_assert (tree->root == tree->nil);
tree->root = node;
tmp_node = tree->parent_node;
tmp_tree = tree->parent_tree;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]