diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-30 13:47:08 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-30 17:19:26 +0100 |
commit | 48a13327c663a9e1409cc98936190f3d1565fcc2 (patch) | |
tree | b032b9535fe6c80e30871c7abf36b16b459e1416 /src | |
parent | cfa3633025e15f1db467520548013095b67c47ca (diff) |
Add noexcept to QLine comparisons
Change-Id: Id75a8511c66d9fe23450043a9230f8dc8925be28
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/tools/qline.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qline.h b/src/corelib/tools/qline.h index 8d57e09c4a..e35de2af6d 100644 --- a/src/corelib/tools/qline.h +++ b/src/corelib/tools/qline.h @@ -83,8 +83,8 @@ public: inline void setPoints(const QPoint &p1, const QPoint &p2); inline void setLine(int x1, int y1, int x2, int y2); - constexpr inline bool operator==(const QLine &d) const; - constexpr inline bool operator!=(const QLine &d) const { return !(*this == d); } + constexpr inline bool operator==(const QLine &d) const noexcept; + constexpr inline bool operator!=(const QLine &d) const noexcept { return !(*this == d); } private: QPoint pt1, pt2; @@ -194,7 +194,7 @@ inline void QLine::setLine(int aX1, int aY1, int aX2, int aY2) pt2 = QPoint(aX2, aY2); } -constexpr inline bool QLine::operator==(const QLine &d) const +constexpr inline bool QLine::operator==(const QLine &d) const noexcept { return pt1 == d.pt1 && pt2 == d.pt2; } |