diff options
| author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2025-02-05 13:07:43 +0100 |
|---|---|---|
| committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2025-02-05 20:35:32 +0100 |
| commit | da71fb9343d868fdfc10ec52fa2445b9b3f940b7 (patch) | |
| tree | 560930f6990c9dde3852b8fe16bd09bb6c83d0b1 /src/corelib/tools/qrect.cpp | |
| parent | d908e043984dcfed3aa80e30cd1cafacd13b644d (diff) | |
QRectF: remove some unnecessary casts
qFloor and qCeil already return int, so the casts aren't necessary.
Change-Id: Ie9df17718d2f32b924c243ae03ef71060e781ec4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/tools/qrect.cpp')
| -rw-r--r-- | src/corelib/tools/qrect.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp index 698181b7f33..a82183bc804 100644 --- a/src/corelib/tools/qrect.cpp +++ b/src/corelib/tools/qrect.cpp @@ -2333,10 +2333,10 @@ bool QRectF::intersects(const QRectF &r) const noexcept QRect QRectF::toAlignedRect() const noexcept { - 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); } |
