From 2d7b9b02e991aecb51a27467f577b07563fd0e15 Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Mon, 16 Jan 2023 16:58:27 +0100 Subject: 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 Reviewed-by: Marc Mutz --- src/corelib/time/qcalendar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/time/qcalendar.cpp') 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): -- cgit v1.2.3