Fix warnings about unused functions

The operator<= and operator>= overloads for QPoint are used only with
Q_ASSERT. Clang was correct that they are not used.

Even though they are inline, Clang reports the functions as unused
because they were inside an anonymous namespace. So take the off the
namespace. They are correct for external use, should they be exported
by accident (which they aren't now).

painting/qpathsimplifier.cpp:76:13: error: unused function 'operator<='
      [-Werror,-Wunused-function]
inline bool operator <= (const QPoint &a, const QPoint &b)

Change-Id: I67415621e777fd0d59cbdede26c34d8bb13f7346
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
bb10
Thiago Macieira 2012-12-21 22:01:23 -08:00 committed by The Qt Project
parent a8321f21fb
commit fa77402089
1 changed files with 2 additions and 1 deletions

View File

@ -57,7 +57,6 @@ QT_BEGIN_NAMESPACE
#define Q_TRIANGULATE_END_OF_POLYGON quint32(-1)
namespace {
//============================================================================//
// QPoint //
@ -83,6 +82,8 @@ inline bool operator >= (const QPoint &a, const QPoint &b)
return !(a < b);
}
namespace {
inline int cross(const QPoint &u, const QPoint &v)
{
return u.x() * v.y() - u.y() * v.x();