[gnome-builder] auto-indent: handle ... correctly
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] auto-indent: handle ... correctly
- Date: Fri, 12 Dec 2014 12:05:07 +0000 (UTC)
commit f0b815a79f07ac443fa793584426342b043c8fd6
Author: Christian Hergert <christian hergert me>
Date: Fri Dec 12 02:21:37 2014 -0800
auto-indent: handle ... correctly
src/auto-indent/gb-source-auto-indenter-c.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/auto-indent/gb-source-auto-indenter-c.c b/src/auto-indent/gb-source-auto-indenter-c.c
index 98c3e24..09e1421 100644
--- a/src/auto-indent/gb-source-auto-indenter-c.c
+++ b/src/auto-indent/gb-source-auto-indenter-c.c
@@ -1002,8 +1002,11 @@ format_parameters (GtkTextIter *begin,
for (iter = params; iter; iter = iter->next)
{
Parameter *p = iter->data;
- max_star = MAX (max_star, p->n_star);
- max_type = MAX (max_type, strlen (p->type));
+
+ if (p->n_star)
+ max_star = MAX (max_star, p->n_star);
+ if (p->type)
+ max_type = MAX (max_type, strlen (p->type));
}
str = g_string_new (NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]