diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-12-21 22:01:23 -0800 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-07 13:39:08 +0100 |
commit | fa77402089e6659fd404f09a7106f83b36b563e8 (patch) | |
tree | 60950a8e65ced759c9f5810627297687904a4076 | |
parent | a8321f21fb82714771b4717c99dd475f2c74649e (diff) |
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>
-rw-r--r-- | src/gui/painting/qpathsimplifier.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/painting/qpathsimplifier.cpp b/src/gui/painting/qpathsimplifier.cpp index 01964b8dbe..66bdf3cdbb 100644 --- a/src/gui/painting/qpathsimplifier.cpp +++ b/src/gui/painting/qpathsimplifier.cpp @@ -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(); |