From 8b472f111b5064f75fd68275f4be1799af828b44 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 9 Jan 2021 14:27:53 +0200 Subject: [PATCH] remove some redundant int constructs Signed-off-by: Ivailo Monev --- src/core/tools/qrect.cpp | 8 ++++---- src/gui/painting/qstroker.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/tools/qrect.cpp b/src/core/tools/qrect.cpp index e6ec4dccd..0b612bee5 100644 --- a/src/core/tools/qrect.cpp +++ b/src/core/tools/qrect.cpp @@ -2354,10 +2354,10 @@ bool QRectF::intersects(const QRectF &r) const QRect QRectF::toAlignedRect() const { - int xmin = int(qFloor(xp)); - int xmax = int(qCeil(xp + w)); - int ymin = int(qFloor(yp)); - int ymax = int(qCeil(yp + h)); + int xmin = qFloor(xp); + int xmax = qCeil(xp + w); + int ymin = qFloor(yp); + int ymax = qCeil(yp + h); return QRect(xmin, ymin, xmax - xmin, ymax - ymin); } diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp index 25fa305b5..fbc1f9438 100644 --- a/src/gui/painting/qstroker.cpp +++ b/src/gui/painting/qstroker.cpp @@ -904,8 +904,8 @@ QPointF qt_curves_for_arc(const QRectF &rect, qreal startAngle, qreal sweepLengt } } - int startSegment = int(qFloor(startAngle / 90)); - int endSegment = int(qFloor((startAngle + sweepLength) / 90)); + int startSegment = qFloor(startAngle / 90); + int endSegment = qFloor((startAngle + sweepLength) / 90); qreal startT = (startAngle - startSegment * 90) / 90; qreal endT = (startAngle + sweepLength - endSegment * 90) / 90; -- 2.11.0