diff --git a/src/blackgui/models/listmodelbase.h b/src/blackgui/models/listmodelbase.h index c89732a8a..efc2452b6 100644 --- a/src/blackgui/models/listmodelbase.h +++ b/src/blackgui/models/listmodelbase.h @@ -198,8 +198,7 @@ namespace BlackGui { if (!tieBreakers.isEmpty()) { - const std::integral_constant marker; - return compareForModelSort(a, b, order, tieBreakers.front(), tieBreakers.copyFrontRemoved(), marker); + return compareForModelSort(a, b, order, tieBreakers.front(), tieBreakers.copyFrontRemoved(), std::true_type()); } return false; } @@ -214,8 +213,7 @@ namespace BlackGui const BlackMisc::CVariant bQv = b.propertyByIndex(index); if (!tieBreakers.isEmpty() && aQv == bQv) { - const std::integral_constant marker; - return compareForModelSort(a, b, order, tieBreakers.front(), tieBreakers.copyFrontRemoved(), marker); + return compareForModelSort(a, b, order, tieBreakers.front(), tieBreakers.copyFrontRemoved(), std::false_type()); } return (order == Qt::AscendingOrder) ? (aQv < bQv) : (bQv < aQv); } diff --git a/src/blackmisc/optional.h b/src/blackmisc/optional.h index 1604075f4..5b4a7bce8 100644 --- a/src/blackmisc/optional.h +++ b/src/blackmisc/optional.h @@ -19,7 +19,9 @@ namespace BlackMisc { /*! - * Class which can directly contain zero or one object of type T, with pointer semantics. + * Own implementation of std::optional. + * + * Needed to work around lack of C++20 copyable lambda functions. */ template class Optional diff --git a/src/xswiftbus/service.cpp b/src/xswiftbus/service.cpp index aa71cecca..c3820cfa1 100644 --- a/src/xswiftbus/service.cpp +++ b/src/xswiftbus/service.cpp @@ -148,7 +148,7 @@ namespace XSwiftBus static const CMessage::string ellipsis = u8"\u2026"; const unsigned lineLength = m_messages.maxLineLength() - 1; - using U8It = Utf8Iterator; + using U8It = Utf8Iterator; U8It begin(text.begin(), text.end()); auto characters = std::distance(begin, U8It(text.end(), text.end())); std::vector wrappedLines;