diff --git a/ChangeLog b/ChangeLog index dd16a53203..fcb022ed05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-08-10 Matthias Clasen + + * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_deleted) + (gtk_tree_model_filter_remove_node): Remove ambiguities pointed + out by gcc. + 2005-08-10 James Henstridge * configure.in: fix definition of GDK_DEP_CFLAGS so that it diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index dd16a53203..fcb022ed05 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2005-08-10 Matthias Clasen + + * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_deleted) + (gtk_tree_model_filter_remove_node): Remove ambiguities pointed + out by gcc. + 2005-08-10 James Henstridge * configure.in: fix definition of GDK_DEP_CFLAGS so that it diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index dd16a53203..fcb022ed05 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2005-08-10 Matthias Clasen + + * gtk/gtktreemodelfilter.c (gtk_tree_model_filter_row_deleted) + (gtk_tree_model_filter_remove_node): Remove ambiguities pointed + out by gcc. + 2005-08-10 James Henstridge * configure.in: fix definition of GDK_DEP_CFLAGS so that it diff --git a/gtk/gtktreemodelfilter.c b/gtk/gtktreemodelfilter.c index d786d55fa9..85a89b77b5 100644 --- a/gtk/gtktreemodelfilter.c +++ b/gtk/gtktreemodelfilter.c @@ -906,7 +906,8 @@ gtk_tree_model_filter_remove_node (GtkTreeModelFilter *filter, { g_array_remove_index (level->array, i); - for (i = MAX (--i, 0); i < level->array->len; i++) + i--; + for (i = MAX (i, 0); i < level->array->len; i++) { /* NOTE: here we do *not* decrease offsets, because the node was * not removed from the child model @@ -1594,7 +1595,8 @@ gtk_tree_model_filter_row_deleted (GtkTreeModel *c_model, offset = tmp->offset; g_array_remove_index (level->array, i); - for (i = MAX (--i, 0); i < level->array->len; i++) + i--; + for (i = MAX (i, 0); i < level->array->len; i++) { elt = &g_array_index (level->array, FilterElt, i); if (elt->offset > offset)