diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-07 15:18:16 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-01-07 15:18:16 +0100 |
commit | cdf13ce286b14273e1e29c5bb02cbc880f31b786 (patch) | |
tree | 10733cb3fb35647b19cfd15ab158f56b1cb550e1 /src/gui/opengl/qtriangulator.cpp | |
parent | 21d607c81af0cd285e9bb3869ac3cd18358f1c8f (diff) | |
parent | a8321f21fb82714771b4717c99dd475f2c74649e (diff) |
Merge branch 'stable' into dev
Conflicts:
tests/auto/widgets/graphicsview/qgraphicsscene/tst_qgraphicsscene.cpp
Change-Id: I6b8d505fc22f052c307ca27f58f7d16f98965f47
Diffstat (limited to 'src/gui/opengl/qtriangulator.cpp')
-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) |