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.

Change-Id: I3fce2277f328284e098afeee40c319a7ba85fefe
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit e358f3158cc2d5c248b5626f15e556414fc0cd6a)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Marc Mutz 2024-09-04 15:46:19 +02:00 committed by Qt Cherry-pick Bot
parent 3758321282
commit c92b1f294e
2 changed files with 2 additions and 2 deletions

View File

@ -1167,7 +1167,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;
}

View File

@ -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 QCalendarBackend;