optimize QWidgetPrivate::mapToWS() and QWidgetPrivate::mapFromWS()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2020-10-24 23:13:56 +03:00
parent d484a59e39
commit 40b140a2dc

View file

@ -516,10 +516,10 @@ public:
{ return p + data.wrect.topLeft(); }
inline QRect mapToWS(const QRect &r) const
{ QRect rr(r); rr.translate(-data.wrect.topLeft()); return rr; }
{ return r.translated(-data.wrect.topLeft()); }
inline QRect mapFromWS(const QRect &r) const
{ QRect rr(r); rr.translate(data.wrect.topLeft()); return rr; }
{ return r.translated(data.wrect.topLeft()); }
// Variables.
// Regular pointers (keep them together to avoid gaps on 64 bit architectures).