From 5a5b61fa8085a8c5eec59614834cb882d1d778e2 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Mon, 18 Jun 2018 20:54:25 +0200 Subject: =?UTF-8?q?Run=20clang-tidy=E2=80=99s=20modernize-use-bool-literal?= =?UTF-8?q?s=20pass.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This makes it clearer whether an integer or a boolean has to be passed in this specific call. --- src/style-internal.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/style-internal.cpp') diff --git a/src/style-internal.cpp b/src/style-internal.cpp index f1d672fce..429353493 100644 --- a/src/style-internal.cpp +++ b/src/style-internal.cpp @@ -2694,11 +2694,11 @@ SPITextDecorationLine::read( gchar const *str ) { // This method ignores inlineid keys and extra delimiters, so " ,,, blink hello" will set // blink and ignore hello const gchar *hstr = str; - while (1) { + while (true) { if (*str == ' ' || *str == ',' || *str == '\0'){ int slen = str - hstr; // CSS 2 keywords - while(1){ // not really a loop, used to avoid a goto + while(true){ // not really a loop, used to avoid a goto hit_one = true; // most likely we will if ((slen == 9) && strneq(hstr, "underline", slen)){ found_underline = true; break; } if ((slen == 8) && strneq(hstr, "overline", slen)){ found_overline = true; break; } @@ -2833,7 +2833,7 @@ SPITextDecorationStyle::read( gchar const *str ) { // this method ignores inlineid keys and extra delimiters, so " ,,, style hello" will set style and ignore hello // if more than one style is present, the first is used const gchar *hstr = str; - while (1) { + while (true) { if (*str == ' ' || *str == ',' || *str == '\0'){ int slen = str - hstr; if ( (slen == 5) && strneq(hstr, "solid", slen)){ found_solid = true; found_one = true; break; } @@ -2977,7 +2977,7 @@ SPITextDecoration::read( gchar const *str ) { test_color.read( "currentColor" ); // Default value test_color.set = false; const gchar *hstr = str; - while (1) { + while (true) { if (*str == ' ' || *str == ',' || *str == '\0'){ int slen = str - hstr; gchar *frag = g_strndup(hstr,slen+1); // only send one piece at a time, since keywords may be intermixed -- cgit v1.2.3