From 009833c1d6be271d611c183aae781e41b71ca927 Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sun, 5 Jul 2015 03:47:36 +0200 Subject: Fix compilation failure in make check (bzr r14228) --- src/display/curve.cpp | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) (limited to 'src/display/curve.cpp') diff --git a/src/display/curve.cpp b/src/display/curve.cpp index d236d81cf..2f422c151 100644 --- a/src/display/curve.cpp +++ b/src/display/curve.cpp @@ -627,20 +627,10 @@ SPCurve::nodes_in_path() const { size_t nr = 0; for(Geom::PathVector::const_iterator it = _pathv.begin(); it != _pathv.end(); ++it) { - nr += (*it).size(); - - nr++; // count last node (this works also for closed paths because although they don't have a 'last node', they do have an extra segment - - // do not count closing knot double for zero-length closing line segments - // however, if the path is only a moveto, and is closed, do not subtract 1 (otherwise the result will be zero nodes) - if ( it->closed() - && ((*it).size() != 0) ) - { - Geom::Curve const &c = it->back_closed(); - if (are_near(c.initialPoint(), c.finalPoint())) { - nr--; - } - } + // if the path does not have any segments, it is a naked moveto, + // and therefore any path has at least one valid node + size_t psize = std::max(1ul, it->size_closed()); + nr += psize; } return nr; -- cgit v1.2.3 From b020354dc251990e7113eb402be5ff9c0e1faa7c Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sun, 5 Jul 2015 21:02:33 +0200 Subject: Hopefully fix build failure on i386 (bzr r14232) --- src/display/curve.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/display/curve.cpp') diff --git a/src/display/curve.cpp b/src/display/curve.cpp index 2f422c151..386c63166 100644 --- a/src/display/curve.cpp +++ b/src/display/curve.cpp @@ -629,7 +629,7 @@ SPCurve::nodes_in_path() const for(Geom::PathVector::const_iterator it = _pathv.begin(); it != _pathv.end(); ++it) { // if the path does not have any segments, it is a naked moveto, // and therefore any path has at least one valid node - size_t psize = std::max(1ul, it->size_closed()); + size_t psize = std::max(1, it->size_closed()); nr += psize; } -- cgit v1.2.3