Arrays - Fixed drug-induced error in ::empty()

This commit is contained in:
Emmanuel BENOîT 2017-11-03 11:38:04 +01:00
parent ec0dba97f2
commit 3745631e02

View file

@ -150,7 +150,7 @@ inline uint32_t T_Array< T >::growth( ) const noexcept
template< typename T > template< typename T >
inline bool T_Array< T >::empty( ) const noexcept inline bool T_Array< T >::empty( ) const noexcept
{ {
return size_ != 0; return size_ == 0;
} }
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
@ -1146,7 +1146,7 @@ inline uint32_t T_StaticArray< T , S >::size( ) const noexcept
template< typename T , uint32_t S > template< typename T , uint32_t S >
inline bool T_StaticArray< T , S >::empty( ) const noexcept inline bool T_StaticArray< T , S >::empty( ) const noexcept
{ {
return size_ != 0; return size_ == 0;
} }
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/
@ -1779,7 +1779,7 @@ inline bool T_AutoArray< T , S , G >::isStatic( ) const noexcept
template< typename T , uint32_t S , uint32_t G > template< typename T , uint32_t S , uint32_t G >
inline bool T_AutoArray< T , S , G >::empty( ) const noexcept inline bool T_AutoArray< T , S , G >::empty( ) const noexcept
{ {
return size( ) != 0; return size( ) == 0;
} }
/*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*/