From f9327fecc1dca707a10b52ffe13b0240320b85fe Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Thu, 16 Feb 2012 07:42:11 +0100 Subject: 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 Reviewed-by: Gunnar Sletta --- src/corelib/tools/qline.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/corelib/tools/qline.cpp') diff --git a/src/corelib/tools/qline.cpp b/src/corelib/tools/qline.cpp index 1ca9a59bde..78f1c44263 100644 --- a/src/corelib/tools/qline.cpp +++ b/src/corelib/tools/qline.cpp @@ -412,16 +412,12 @@ QDataStream &operator>>(QDataStream &stream, QLine &line) */ /*! + \fn bool QLineF::isNull() const + Returns true if the line is not set up with valid start and end point; otherwise returns false. */ -bool QLineF::isNull() const -{ - return (qFuzzyCompare(pt1.x(), pt2.x()) && qFuzzyCompare(pt1.y(), pt2.y())) ? true : false; -} - - /*! \fn QPointF QLineF::p1() const -- cgit v1.2.3