diff options
author | Jędrzej Nowacki <jedrzej.nowacki@digia.com> | 2013-01-07 16:57:32 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-07 18:07:29 +0100 |
commit | ae2359d49e171c61450b17b1eb0e0dd7a20c7ca4 (patch) | |
tree | fbf5ef281002a47659d80405ae38f48b57e19c22 /src/gui/opengl | |
parent | 998899cf3a2501d3bf30ad06ce47a2cf81e1d60b (diff) | |
parent | cdf13ce286b14273e1e29c5bb02cbc880f31b786 (diff) |
Merge "Merge branch 'stable' into dev" into refs/staging/dev
Diffstat (limited to 'src/gui/opengl')
-rw-r--r-- | src/gui/opengl/qtriangulator.cpp | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/gui/opengl/qtriangulator.cpp b/src/gui/opengl/qtriangulator.cpp index b506ffdc6a..d31c260f3d 100644 --- a/src/gui/opengl/qtriangulator.cpp +++ b/src/gui/opengl/qtriangulator.cpp @@ -220,23 +220,6 @@ static inline bool qPointIsLeftOfLine(const QPodPoint &p, const QPodPoint &v1, c return QT_PREPEND_NAMESPACE(qPointDistanceFromLine)(p, v1, v2) < 0; } -// Return: -// -1 if u < v -// 0 if u == v -// 1 if u > v -static int comparePoints(const QPodPoint &u, const QPodPoint &v) -{ - if (u.y < v.y) - return -1; - if (u.y > v.y) - return 1; - if (u.x < v.x) - return -1; - if (u.x > v.x) - return 1; - return 0; -} - //============================================================================// // QIntersectionPoint // //============================================================================// @@ -632,16 +615,6 @@ public: bool pointingUp, originallyPointingUp; }; - friend class CompareEdges; - class CompareEdges - { - public: - inline CompareEdges(ComplexToSimple *parent) : m_parent(parent) { } - bool operator () (int i, int j) const; - private: - ComplexToSimple *m_parent; - }; - struct Intersection { bool operator < (const Intersection &other) const {return other.intersectionPoint < intersectionPoint;} @@ -1654,18 +1627,6 @@ void QTriangulator<T>::ComplexToSimple::removeUnusedPoints() { } template <typename T> -bool QTriangulator<T>::ComplexToSimple::CompareEdges::operator () (int i, int j) const -{ - int cmp = comparePoints(m_parent->m_parent->m_vertices.at(m_parent->m_edges.at(i).from), - m_parent->m_parent->m_vertices.at(m_parent->m_edges.at(j).from)); - if (cmp == 0) { - cmp = comparePoints(m_parent->m_parent->m_vertices.at(m_parent->m_edges.at(i).to), - m_parent->m_parent->m_vertices.at(m_parent->m_edges.at(j).to)); - } - return cmp > 0; -} - -template <typename T> inline bool QTriangulator<T>::ComplexToSimple::Event::operator < (const Event &other) const { if (point == other.point) |