[gtksourceview] Make assertion conditional
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Make assertion conditional
- Date: Tue, 27 Dec 2011 09:45:54 +0000 (UTC)
commit e4699fedcc9730727703e88513b2f10f0569b17d
Author: Paolo Borelli <pborelli gnome org>
Date: Tue Dec 27 10:31:01 2011 +0100
Make assertion conditional
Only check when ENABLE_CHECK_TREE is set since it involves walking
the list twice.
gtksourceview/gtksourcecontextengine.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourcecontextengine.c b/gtksourceview/gtksourcecontextengine.c
index d16afed..81a93fc 100644
--- a/gtksourceview/gtksourcecontextengine.c
+++ b/gtksourceview/gtksourcecontextengine.c
@@ -1347,7 +1347,9 @@ static void
remove_invalid (GtkSourceContextEngine *ce,
Segment *segment)
{
+#ifdef ENABLE_CHECK_TREE
g_assert (g_slist_find (ce->priv->invalid, segment) != NULL);
+#endif
ce->priv->invalid = g_slist_remove (ce->priv->invalid, segment);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]