diff options
| author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-18 18:54:25 +0000 |
|---|---|---|
| committer | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> | 2018-06-18 18:54:25 +0000 |
| commit | 5a5b61fa8085a8c5eec59614834cb882d1d778e2 (patch) | |
| tree | 848df1de494bcdae296dcaf1de4a164cbaaec780 /src/style-internal.cpp | |
| parent | Run clang-tidy’s modernize-pass-by-value pass. (diff) | |
| download | inkscape-5a5b61fa8085a8c5eec59614834cb882d1d778e2.tar.gz inkscape-5a5b61fa8085a8c5eec59614834cb882d1d778e2.zip | |
Run clang-tidy’s modernize-use-bool-literals pass.
This makes it clearer whether an integer or a boolean has to be passed
in this specific call.
Diffstat (limited to 'src/style-internal.cpp')
| -rw-r--r-- | src/style-internal.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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 |
