diff options
| author | Shlomi Fish <shlomif@shlomifish.org> | 2016-09-03 15:36:16 +0000 |
|---|---|---|
| committer | Shlomi Fish <shlomif@shlomifish.org> | 2016-09-03 15:36:16 +0000 |
| commit | 67d581b36454423696a03daac2ddf1aeee07189c (patch) | |
| tree | 46e4e639bcbf39e6736bbabae281611148c2bf34 /src/livarot/Path.cpp | |
| parent | Convert to boolean truth/falsehood. (diff) | |
| download | inkscape-67d581b36454423696a03daac2ddf1aeee07189c.tar.gz inkscape-67d581b36454423696a03daac2ddf1aeee07189c.zip | |
Refactoring
(bzr r15100.1.10)
Diffstat (limited to 'src/livarot/Path.cpp')
| -rw-r--r-- | src/livarot/Path.cpp | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/livarot/Path.cpp b/src/livarot/Path.cpp index 68891e4aa..5fa418968 100644 --- a/src/livarot/Path.cpp +++ b/src/livarot/Path.cpp @@ -380,24 +380,18 @@ void Path::InsertBezierTo(Geom::Point const &iPt, int iNb, int at) /* - * points de la polyligne + * points of the polyline */ void Path::SetBackData (bool nVal) { - if (back == false) { - if (nVal == true && back == false) { + if (! back) { + if (nVal) { back = true; ResetPoints(); - } else if (nVal == false && back == true) { - back = false; - ResetPoints(); } } else { - if (nVal == true && back == false) { - back = true; - ResetPoints(); - } else if (nVal == false && back == true) { + if (! nVal) { back = false; ResetPoints(); } @@ -417,7 +411,7 @@ int Path::AddPoint(Geom::Point const &iPt, bool mvto) return AddPoint (iPt, -1, 0.0, mvto); } - if ( !mvto && pts.empty() == false && pts.back().p == iPt ) { + if ( !mvto && !pts.empty() && pts.back().p == iPt ) { return -1; } @@ -441,11 +435,11 @@ int Path::ReplacePoint(Geom::Point const &iPt) int Path::AddPoint(Geom::Point const &iPt, int ip, double it, bool mvto) { - if (back == false) { + if (! back) { return AddPoint (iPt, mvto); } - if ( !mvto && pts.empty() == false && pts.back().p == iPt ) { + if ( !mvto && !pts.empty() && pts.back().p == iPt ) { return -1; } |
