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>
This commit is contained in:
Thiago Macieira 2012-12-21 21:40:30 -08:00 committed by The Qt Project
parent ddf8ebb014
commit 77924a0276

View File

@ -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;}
@ -1653,18 +1626,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
{