diff options
| author | Krzysztof Kosi??ski <tweenk.pl@gmail.com> | 2015-05-08 17:26:29 +0000 |
|---|---|---|
| committer | Krzysztof KosiĆski <tweenk.pl@gmail.com> | 2015-05-08 17:26:29 +0000 |
| commit | f31b2c75e1313ccceeb6d33cc14aa545d4d370f9 (patch) | |
| tree | 444b38fe397f34ee5c298ed0efd5cc9f49afb7cf /src/libavoid | |
| parent | More helper/geom.h pruning. (diff) | |
| parent | cmake: Bring cmake installation in line with autotools (bug #1451481) (diff) | |
| download | inkscape-f31b2c75e1313ccceeb6d33cc14aa545d4d370f9.tar.gz inkscape-f31b2c75e1313ccceeb6d33cc14aa545d4d370f9.zip | |
Merge from trunk
(bzr r14059.2.11)
Diffstat (limited to 'src/libavoid')
| -rw-r--r-- | src/libavoid/connector.cpp | 6 | ||||
| -rw-r--r-- | src/libavoid/graph.cpp | 4 | ||||
| -rw-r--r-- | src/libavoid/orthogonal.cpp | 1 |
3 files changed, 4 insertions, 7 deletions
diff --git a/src/libavoid/connector.cpp b/src/libavoid/connector.cpp index 40ded7498..36892c668 100644 --- a/src/libavoid/connector.cpp +++ b/src/libavoid/connector.cpp @@ -1476,7 +1476,6 @@ CrossingsInfoPair countRealCrossings(Avoid::Polygon& poly, int prevTurnDir = -1; int startCornerSide = 1; int endCornerSide = 1; - bool reversed = false; if (!front_same) { // If there is a divergence at the beginning, @@ -1485,7 +1484,6 @@ CrossingsInfoPair countRealCrossings(Avoid::Polygon& poly, startCornerSide = Avoid::cornerSide(*c_path[0], *c_path[1], *c_path[2], *p_path[0]) * segDir(*c_path[1], *c_path[2]); - reversed = (startCornerSide != -prevTurnDir); } if (!back_same) { @@ -1497,7 +1495,6 @@ CrossingsInfoPair countRealCrossings(Avoid::Polygon& poly, *c_path[size - 2], *c_path[size - 1], *p_path[size - 1]) * segDir(*c_path[size - 3], *c_path[size - 2]); - reversed = (endCornerSide != -prevTurnDir); } else { @@ -1578,10 +1575,9 @@ CrossingsInfoPair countRealCrossings(Avoid::Polygon& poly, } } #endif - prevTurnDir = 0; if (pointOrders) { - reversed = false; + bool reversed = false; size_t startPt = (front_same) ? 0 : 1; // Orthogonal should always have at least one segment. diff --git a/src/libavoid/graph.cpp b/src/libavoid/graph.cpp index 728f8c085..5b617f123 100644 --- a/src/libavoid/graph.cpp +++ b/src/libavoid/graph.cpp @@ -129,7 +129,9 @@ static inline int orthogTurnOrder(const Point& a, const Point& b, // Note: This method assumes the two Edges that share a common point. bool EdgeInf::rotationLessThan(const VertInf *lastV, const EdgeInf *rhs) const { - if ((_v1 == rhs->_v1) && (_v2 == rhs->_v2)) + assert(_v1 == rhs->_v1 || _v1 == rhs->_v2 || _v2 == rhs->_v1 || _v2 == rhs->_v2 ); + + if ((_v1 == rhs->_v1) && (_v2 == rhs->_v2)) { // Effectively the same visibility edge, so they are equal. return false; diff --git a/src/libavoid/orthogonal.cpp b/src/libavoid/orthogonal.cpp index b5ef8d7e8..466d1dd58 100644 --- a/src/libavoid/orthogonal.cpp +++ b/src/libavoid/orthogonal.cpp @@ -1548,7 +1548,6 @@ extern void generateStaticOrthogonalVisGraph(Router *router) // Process the horizontal sweep thisPos = (totalEvents > 0) ? events[0]->pos : 0; posStartIndex = 0; - posFinishIndex = 0; for (unsigned i = 0; i <= totalEvents; ++i) { // If we have finished the current scanline or all events, then we |
