From fa77402089e6659fd404f09a7106f83b36b563e8 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 21 Dec 2012 22:01:23 -0800 Subject: 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 --- src/gui/painting/qpathsimplifier.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/gui/painting/qpathsimplifier.cpp') 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(); -- cgit v1.2.3