From e358f3158cc2d5c248b5626f15e556414fc0cd6a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 4 Sep 2024 15:46:19 +0200 Subject: [PATCH] QLocale: mark equals() noexcept It effectively was, relational operators should be, and comparesEqual(), which calls equals(), actually already was marked as noexcept, so also mark the out-of-line function. Found in API review. Pick-to: 6.8 Change-Id: I3fce2277f328284e098afeee40c319a7ba85fefe Reviewed-by: Ivan Solovev --- src/corelib/text/qlocale.cpp | 2 +- src/corelib/text/qlocale.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/corelib/text/qlocale.cpp b/src/corelib/text/qlocale.cpp index 18256ca8910..4bfc77efa66 100644 --- a/src/corelib/text/qlocale.cpp +++ b/src/corelib/text/qlocale.cpp @@ -1221,7 +1221,7 @@ QLocale &QLocale::operator=(const QLocale &other) noexcept = default; Equality comparison. */ -bool QLocale::equals(const QLocale &other) const +bool QLocale::equals(const QLocale &other) const noexcept { return d->m_data == other.d->m_data && d->m_numberOptions == other.d->m_numberOptions; } diff --git a/src/corelib/text/qlocale.h b/src/corelib/text/qlocale.h index 0171e3fc3aa..fb7b1a198a2 100644 --- a/src/corelib/text/qlocale.h +++ b/src/corelib/text/qlocale.h @@ -1167,7 +1167,7 @@ public: private: QLocale(QLocalePrivate &dd); - bool equals(const QLocale &other) const; + bool equals(const QLocale &other) const noexcept; friend class QLocalePrivate; friend class QSystemLocale; friend class QTimeZonePrivate;