diff options
| author | Edward Welbourne <edward.welbourne@qt.io> | 2023-01-16 16:58:27 +0100 |
|---|---|---|
| committer | Edward Welbourne <edward.welbourne@qt.io> | 2023-01-19 17:57:04 +0100 |
| commit | 2d7b9b02e991aecb51a27467f577b07563fd0e15 (patch) | |
| tree | 71c766f66121385712cc27a96e9ceb35d4e90661 /src/corelib/time/qcalendar.cpp | |
| parent | 5c40cb0f1a8fad03edb3ef0f97df15e9dd643bdf (diff) | |
QRoundingDown: make the numerator a template parameter
It's always a constexpr (or static const that could be constexpr; fix
the cases of this while I'm here) or an integer literal, so we can, so
we might as well.
Change-Id: I61e9bcdb27f4a05f011ccce16b5f15d0dade0782
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/corelib/time/qcalendar.cpp')
| -rw-r--r-- | src/corelib/time/qcalendar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/time/qcalendar.cpp b/src/corelib/time/qcalendar.cpp index a355df21004..a6801fe7253 100644 --- a/src/corelib/time/qcalendar.cpp +++ b/src/corelib/time/qcalendar.cpp @@ -867,7 +867,7 @@ int QCalendarBackend::maximumMonthsInYear() const */ int QCalendarBackend::dayOfWeek(qint64 jd) const { - return QRoundingDown::qMod(jd, 7) + 1; + return QRoundingDown::qMod<7>(jd) + 1; } // Month and week-day name look-ups (implemented in qlocale.cpp): |
