diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2012-02-16 07:42:11 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-20 15:17:08 +0100 |
commit | f9327fecc1dca707a10b52ffe13b0240320b85fe (patch) | |
tree | 90891353d87886581631b7eb5066f9aa93251314 /src/corelib/tools/qline.h | |
parent | 3c21a62cbe7944e6e65681c50664ca0aacda6e16 (diff) |
QPoint/QPointF: inline manhattanLength(); QLineF: inline isNull()
There's no reason for them not to be, and it's a prerequisite
for making these functions constexpr.
Change-Id: I03c9965147b51014c7af60a4c2d7f25a3f6e21a7
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/corelib/tools/qline.h')
-rw-r--r-- | src/corelib/tools/qline.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/corelib/tools/qline.h b/src/corelib/tools/qline.h index 3c7977a207..58ef0316ad 100644 --- a/src/corelib/tools/qline.h +++ b/src/corelib/tools/qline.h @@ -310,6 +310,11 @@ inline qreal QLineF::y2() const return pt2.y(); } +inline bool QLineF::isNull() const +{ + return qFuzzyCompare(pt1.x(), pt2.x()) && qFuzzyCompare(pt1.y(), pt2.y()); +} + inline QPointF QLineF::p1() const { return pt1; |