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/display | |
| 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/display')
| -rw-r--r-- | src/display/drawing-text.cpp | 8 | ||||
| -rw-r--r-- | src/display/snap-indicator.cpp | 2 | ||||
| -rw-r--r-- | src/display/sp-canvas.cpp | 2 |
3 files changed, 6 insertions, 6 deletions
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])); diff --git a/src/display/snap-indicator.cpp b/src/display/snap-indicator.cpp index 2e329c4aa..79a1191b9 100644 --- a/src/display/snap-indicator.cpp +++ b/src/display/snap-indicator.cpp @@ -323,7 +323,7 @@ SnapIndicator::set_new_snaptarget(Inkscape::SnappedPoint const &p, bool pre_snap nullptr); SP_CTRLRECT(box)->setRectangle(*bbox); - SP_CTRLRECT(box)->setColor(pre_snap ? 0x7f7f7fff : 0xff0000ff, 0, 0); + SP_CTRLRECT(box)->setColor(pre_snap ? 0x7f7f7fff : 0xff0000ff, false, 0); SP_CTRLRECT(box)->setDashed(true); SP_CTRLRECT(box)->pickable = false; // See the extensive comment above sp_canvas_item_move_to_z(box, 0); diff --git a/src/display/sp-canvas.cpp b/src/display/sp-canvas.cpp index 6a38ae3e7..5850cad7a 100644 --- a/src/display/sp-canvas.cpp +++ b/src/display/sp-canvas.cpp @@ -1767,7 +1767,7 @@ bool SPCanvas::paintRect(int xx0, int yy0, int xx1, int yy1) Geom::IntRect paint_rect(xx0, yy0, xx1, yy1); Geom::OptIntRect area = paint_rect & canvas_rect; - if (!area || area->hasZeroArea()) return 0; + if (!area || area->hasZeroArea()) return false; paint_rect = *area; PaintRectSetup setup; |
