more C++11 specifier

This commit is contained in:
Uwe Rathmann 2020-05-03 14:00:19 +02:00
parent 5cbeca4921
commit 4bc74e02df

View File

@ -37,7 +37,7 @@ class QSK_EXPORT QskBoxRenderer
class Quad class Quad
{ {
public: public:
inline constexpr Quad() inline constexpr Quad() noexcept
: left( 0.0 ) : left( 0.0 )
, top( 0.0 ) , top( 0.0 )
, right( 0.0 ) , right( 0.0 )
@ -47,7 +47,7 @@ class QSK_EXPORT QskBoxRenderer
{ {
} }
inline Quad( const QRectF& rect ) inline constexpr Quad( const QRectF& rect ) noexcept
: left( rect.left() ) : left( rect.left() )
, top( rect.top() ) , top( rect.top() )
, right( rect.right() ) , right( rect.right() )
@ -57,7 +57,7 @@ class QSK_EXPORT QskBoxRenderer
{ {
} }
inline bool operator==( const Quad& other ) const inline constexpr bool operator==( const Quad& other ) const noexcept
{ {
return return
( left == other.left ) && ( left == other.left ) &&
@ -66,12 +66,12 @@ class QSK_EXPORT QskBoxRenderer
( bottom == other.bottom ); ( bottom == other.bottom );
} }
inline bool operator!=( const Quad& other ) const inline constexpr bool operator!=( const Quad& other ) const noexcept
{ {
return !( *this == other ); return !( *this == other );
} }
inline bool isEmpty() const inline constexpr bool isEmpty() const noexcept
{ {
return ( width <= 0 ) || ( height <= 0 ); return ( width <= 0 ) || ( height <= 0 );
} }