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 <ivan.solovev@qt.io>
This commit is contained in:
Marc Mutz 2024-09-04 15:46:19 +02:00
parent 97c12e3f2d
commit e358f3158c
2 changed files with 2 additions and 2 deletions

View File

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

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 QTimeZonePrivate;