mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 13:55:36 +08:00
refactor: clang format line length
This commit is contained in:
@@ -42,8 +42,8 @@ namespace swift::misc
|
||||
public mixin::CompareByMetaClass<CPropertyIndex>,
|
||||
public mixin::String<CPropertyIndex>
|
||||
{
|
||||
// In the first trial I have used CSequence<int> as base class. This has created too much circular dependencies of the headers
|
||||
// CIndexVariantMap is used in CValueObject, CPropertyIndex in CIndexVariantMap
|
||||
// In the first trial I have used CSequence<int> as base class. This has created too much circular dependencies
|
||||
// of the headers CIndexVariantMap is used in CValueObject, CPropertyIndex in CIndexVariantMap
|
||||
|
||||
public:
|
||||
//! Default constructor.
|
||||
@@ -103,7 +103,8 @@ namespace swift::misc
|
||||
template <class CastType>
|
||||
CastType frontCasted() const
|
||||
{
|
||||
static_assert(std::is_enum_v<CastType> || std::is_integral_v<CastType>, "CastType must be an enum or integer");
|
||||
static_assert(std::is_enum_v<CastType> || std::is_integral_v<CastType>,
|
||||
"CastType must be an enum or integer");
|
||||
return static_cast<CastType>(frontToInt());
|
||||
}
|
||||
|
||||
@@ -120,10 +121,7 @@ namespace swift::misc
|
||||
{
|
||||
return [index = *this](const auto &a, const auto &b) {
|
||||
using T = std::decay_t<decltype(a)>;
|
||||
if constexpr (THasComparePropertyByIndex<T>::value)
|
||||
{
|
||||
return a.comparePropertyByIndex(index, b);
|
||||
}
|
||||
if constexpr (THasComparePropertyByIndex<T>::value) { return a.comparePropertyByIndex(index, b); }
|
||||
else if constexpr (THasPropertyByIndex<T>::value)
|
||||
{
|
||||
return compare(a.propertyByIndex(index), b.propertyByIndex(index));
|
||||
|
||||
Reference in New Issue
Block a user