[gnome-builder] xml-pack: fix -Wsign-compare warning
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] xml-pack: fix -Wsign-compare warning
- Date: Tue, 28 Feb 2017 19:35:53 +0000 (UTC)
commit 87b063f9f12af79f09b56941d1590f56299eec7d
Author: Christian Hergert <chergert redhat com>
Date: Tue Feb 28 11:35:42 2017 -0800
xml-pack: fix -Wsign-compare warning
plugins/xml-pack/ide-xml-indenter.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plugins/xml-pack/ide-xml-indenter.c b/plugins/xml-pack/ide-xml-indenter.c
index ed999aa..1293042 100644
--- a/plugins/xml-pack/ide-xml-indenter.c
+++ b/plugins/xml-pack/ide-xml-indenter.c
@@ -411,9 +411,13 @@ ide_xml_indenter_format (IdeIndenter *indenter,
}
xml->tab_width = tab_width;
- xml->indent_width = (indent_width <= 0) ? tab_width : indent_width;
xml->use_tabs = !gtk_source_view_get_insert_spaces_instead_of_tabs (GTK_SOURCE_VIEW (view));
+ if (indent_width <= 0)
+ xml->indent_width = tab_width;
+ else
+ xml->indent_width = indent_width;
+
/* do nothing if we are in a cdata section */
if (text_iter_in_cdata (begin))
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]