clange pedantic flags satisfied
This commit is contained in:
parent
d94d510c59
commit
d55f1583ee
@ -127,7 +127,7 @@ static QByteArray qskEnumString( const char* name, int value )
|
|||||||
return key ? QByteArray( key ) : QString::number( value ).toLatin1();
|
return key ? QByteArray( key ) : QString::number( value ).toLatin1();
|
||||||
}
|
}
|
||||||
|
|
||||||
QByteArray qskStateKey( const QMetaObject* metaObject, quint16 state )
|
static QByteArray qskStateKey( const QMetaObject* metaObject, quint16 state )
|
||||||
{
|
{
|
||||||
const auto& stateTable = qskAspectRegistry->stateTable;
|
const auto& stateTable = qskAspectRegistry->stateTable;
|
||||||
|
|
||||||
|
@ -168,8 +168,8 @@ namespace QskAspect
|
|||||||
ColorPrimitive colorPrimitive() const;
|
ColorPrimitive colorPrimitive() const;
|
||||||
MetricPrimitive metricPrimitive() const;
|
MetricPrimitive metricPrimitive() const;
|
||||||
|
|
||||||
void setPrimitive( Type, int primitive );
|
void setPrimitive( Type, uint primitive );
|
||||||
int primitive() const;
|
uint primitive() const;
|
||||||
void clearPrimitive();
|
void clearPrimitive();
|
||||||
|
|
||||||
const char* toPrintable() const;
|
const char* toPrintable() const;
|
||||||
@ -179,24 +179,24 @@ namespace QskAspect
|
|||||||
constexpr Aspect( uint subControl, uint type, bool isAnimator,
|
constexpr Aspect( uint subControl, uint type, bool isAnimator,
|
||||||
uint primitive, uint placement, uint states );
|
uint primitive, uint placement, uint states );
|
||||||
|
|
||||||
|
struct Bits
|
||||||
|
{
|
||||||
|
uint subControl : 12;
|
||||||
|
|
||||||
|
uint type : 3;
|
||||||
|
bool isAnimator : 1;
|
||||||
|
|
||||||
|
uint primitive : 7;
|
||||||
|
uint placement : 1;
|
||||||
|
uint reserved1 : 8;
|
||||||
|
|
||||||
|
uint states : 16;
|
||||||
|
uint reserved2 : 16;
|
||||||
|
};
|
||||||
|
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
struct
|
Bits m_bits;
|
||||||
{
|
|
||||||
uint subControl : 12;
|
|
||||||
|
|
||||||
uint type : 3;
|
|
||||||
bool isAnimator : 1;
|
|
||||||
|
|
||||||
uint primitive : 7;
|
|
||||||
uint placement : 1;
|
|
||||||
uint reserved1 : 8;
|
|
||||||
|
|
||||||
uint states : 16;
|
|
||||||
uint reserved2 : 16;
|
|
||||||
|
|
||||||
} m_bits;
|
|
||||||
|
|
||||||
quint64 m_value;
|
quint64 m_value;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -366,12 +366,12 @@ namespace QskAspect
|
|||||||
return static_cast< MetricPrimitive >( m_bits.primitive );
|
return static_cast< MetricPrimitive >( m_bits.primitive );
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int Aspect::primitive() const
|
inline uint Aspect::primitive() const
|
||||||
{
|
{
|
||||||
return m_bits.primitive;
|
return m_bits.primitive;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void Aspect::setPrimitive( Type type, int primitive )
|
inline void Aspect::setPrimitive( Type type, uint primitive )
|
||||||
{
|
{
|
||||||
m_bits.type = type;
|
m_bits.type = type;
|
||||||
m_bits.primitive = primitive;
|
m_bits.primitive = primitive;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user