Add noexcept to QLine comparisons
Change-Id: Id75a8511c66d9fe23450043a9230f8dc8925be28 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
cfa3633025
commit
48a13327c6
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user