mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-06 02:16:04 +08:00
Style
This commit is contained in:
@@ -198,8 +198,7 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
if (!tieBreakers.isEmpty())
|
if (!tieBreakers.isEmpty())
|
||||||
{
|
{
|
||||||
const std::integral_constant<bool, true> marker;
|
return compareForModelSort<ObjectType>(a, b, order, tieBreakers.front(), tieBreakers.copyFrontRemoved(), std::true_type());
|
||||||
return compareForModelSort<ObjectType>(a, b, order, tieBreakers.front(), tieBreakers.copyFrontRemoved(), marker);
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -214,8 +213,7 @@ namespace BlackGui
|
|||||||
const BlackMisc::CVariant bQv = b.propertyByIndex(index);
|
const BlackMisc::CVariant bQv = b.propertyByIndex(index);
|
||||||
if (!tieBreakers.isEmpty() && aQv == bQv)
|
if (!tieBreakers.isEmpty() && aQv == bQv)
|
||||||
{
|
{
|
||||||
const std::integral_constant<bool, false> marker;
|
return compareForModelSort<ObjectType>(a, b, order, tieBreakers.front(), tieBreakers.copyFrontRemoved(), std::false_type());
|
||||||
return compareForModelSort<ObjectType>(a, b, order, tieBreakers.front(), tieBreakers.copyFrontRemoved(), marker);
|
|
||||||
}
|
}
|
||||||
return (order == Qt::AscendingOrder) ? (aQv < bQv) : (bQv < aQv);
|
return (order == Qt::AscendingOrder) ? (aQv < bQv) : (bQv < aQv);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 <typename T>
|
template <typename T>
|
||||||
class Optional
|
class Optional
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ namespace XSwiftBus
|
|||||||
static const CMessage::string ellipsis = u8"\u2026";
|
static const CMessage::string ellipsis = u8"\u2026";
|
||||||
const unsigned lineLength = m_messages.maxLineLength() - 1;
|
const unsigned lineLength = m_messages.maxLineLength() - 1;
|
||||||
|
|
||||||
using U8It = Utf8Iterator<typename std::string::const_iterator>;
|
using U8It = Utf8Iterator<std::string::const_iterator>;
|
||||||
U8It begin(text.begin(), text.end());
|
U8It begin(text.begin(), text.end());
|
||||||
auto characters = std::distance(begin, U8It(text.end(), text.end()));
|
auto characters = std::distance(begin, U8It(text.end(), text.end()));
|
||||||
std::vector<CMessage::string> wrappedLines;
|
std::vector<CMessage::string> wrappedLines;
|
||||||
|
|||||||
Reference in New Issue
Block a user