diff --git a/src/corelib/global/qcompare.h b/src/corelib/global/qcompare.h index 41f2b2fd5a5..d82cf5ab4a4 100644 --- a/src/corelib/global/qcompare.h +++ b/src/corelib/global/qcompare.h @@ -155,11 +155,10 @@ public: #ifdef __cpp_lib_three_way_comparison constexpr Q_IMPLICIT partial_ordering(std::partial_ordering stdorder) noexcept + : m_order{} // == equivalent { if (stdorder == std::partial_ordering::less) m_order = static_cast(QtPrivate::Ordering::Less); - else if (stdorder == std::partial_ordering::equivalent) - m_order = static_cast(QtPrivate::Ordering::Equivalent); else if (stdorder == std::partial_ordering::greater) m_order = static_cast(QtPrivate::Ordering::Greater); else if (stdorder == std::partial_ordering::unordered) @@ -349,11 +348,10 @@ public: #ifdef __cpp_lib_three_way_comparison constexpr Q_IMPLICIT weak_ordering(std::weak_ordering stdorder) noexcept + : m_order{} // == equivalent { if (stdorder == std::weak_ordering::less) m_order = static_cast(QtPrivate::Ordering::Less); - else if (stdorder == std::weak_ordering::equivalent) - m_order = static_cast(QtPrivate::Ordering::Equivalent); else if (stdorder == std::weak_ordering::greater) m_order = static_cast(QtPrivate::Ordering::Greater); } @@ -545,13 +543,10 @@ public: #ifdef __cpp_lib_three_way_comparison constexpr Q_IMPLICIT strong_ordering(std::strong_ordering stdorder) noexcept + : m_order{} // == equivalent { if (stdorder == std::strong_ordering::less) m_order = static_cast(QtPrivate::Ordering::Less); - else if (stdorder == std::strong_ordering::equivalent) - m_order = static_cast(QtPrivate::Ordering::Equivalent); - else if (stdorder == std::strong_ordering::equal) - m_order = static_cast(QtPrivate::Ordering::Equal); else if (stdorder == std::strong_ordering::greater) m_order = static_cast(QtPrivate::Ordering::Greater); } @@ -814,11 +809,10 @@ public: #ifdef __cpp_lib_three_way_comparison constexpr Q_IMPLICIT QPartialOrdering(std::partial_ordering stdorder) noexcept + : m_order{} // == equivalent { if (stdorder == std::partial_ordering::less) m_order = static_cast(QtPrivate::Ordering::Less); - else if (stdorder == std::partial_ordering::equivalent) - m_order = static_cast(QtPrivate::Ordering::Equivalent); else if (stdorder == std::partial_ordering::greater) m_order = static_cast(QtPrivate::Ordering::Greater); else if (stdorder == std::partial_ordering::unordered)