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/display/drawing-text.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/display/drawing-text.cpp') diff --git a/src/display/drawing-text.cpp b/src/display/drawing-text.cpp index edfd5eca2..76c392d67 100644 --- a/src/display/drawing-text.cpp +++ b/src/display/drawing-text.cpp @@ -306,7 +306,7 @@ void DrawingText::decorateStyle(DrawingContext &dc, double vextent, double xphas else if(_nrstyle.text_decoration_style & TEXT_DECORATION_STYLE_DOTTED){ // FIXME: Per spec, this should produce round dots. Geom::Point pv = ps; - while(1){ + while(true){ Geom::Point pvlast = pv; if(dots[i]>0){ if(pv[Geom::X] > pf[Geom::X]) break; @@ -331,7 +331,7 @@ void DrawingText::decorateStyle(DrawingContext &dc, double vextent, double xphas } else if(_nrstyle.text_decoration_style & TEXT_DECORATION_STYLE_DASHED){ Geom::Point pv = ps; - while(1){ + while(true){ Geom::Point pvlast = pv; if(dashes[i]>0){ if(pv[Geom::X]> pf[Geom::X]) break; @@ -359,7 +359,7 @@ void DrawingText::decorateStyle(DrawingContext &dc, double vextent, double xphas double x = ps[Geom::X]; double y = ps[Geom::Y] + poff[Geom::Y]; dc.moveTo(Geom::Point(x, y + amp * wave[i])); - while(1){ + while(true){ i = ((i + 1) & 15); x += step; dc.lineTo(Geom::Point(x, y + amp * wave[i])); @@ -367,7 +367,7 @@ void DrawingText::decorateStyle(DrawingContext &dc, double vextent, double xphas } y = ps[Geom::Y] - poff[Geom::Y]; dc.lineTo(Geom::Point(x, y + amp * wave[i])); - while(1){ + while(true){ i = ((i - 1) & 15); x -= step; dc.lineTo(Geom::Point(x, y + amp * wave[i])); -- cgit v1.2.3