diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-12-21 21:40:30 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-03 14:18:06 +0100 |
commit | 77924a0276674e3dd3627e33c5ea7005e5ee0d13 (patch) | |
tree | b47027e1bb0d4509d2dc89b9e046aca2021fb6b1 /src/gui/opengl | |
parent | ddf8ebb0145f81d0deb0aabf7b774c42e4be4c2b (diff) |
Remove some dead code from qtriangulator.cpp
The CompareEdges functor class is never used anywhere. Clang saw it
through to the static function that never got used:
qtriangulator.cpp:227:12: error: unused function 'comparePoints'
[-Werror,-Wunused-function]
static int comparePoints(const QPodPoint &u, const QPodPoint &v)
^
Change-Id: I67d821e454daf82bd8107bf20f787aff9496e878
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
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) |