|
|
|
@ -35,6 +35,7 @@ |
|
|
|
#ifndef CORRADE_NO_DEBUG |
|
|
|
#ifndef CORRADE_NO_DEBUG |
|
|
|
#include <Corrade/Utility/Debug.h> |
|
|
|
#include <Corrade/Utility/Debug.h> |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
#include <Corrade/Utility/Macros.h> |
|
|
|
|
|
|
|
|
|
|
|
#include "Magnum/Types.h" |
|
|
|
#include "Magnum/Types.h" |
|
|
|
#include "Magnum/Math/Math.h" |
|
|
|
#include "Magnum/Math/Math.h" |
|
|
|
@ -174,14 +175,14 @@ template<std::size_t size> class BitVector { |
|
|
|
* Equivalent to @ref all(). |
|
|
|
* Equivalent to @ref all(). |
|
|
|
* @see @ref any(), @ref none() |
|
|
|
* @see @ref any(), @ref none() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
explicit operator bool() const { return all(); } |
|
|
|
explicit MAGNUM_CONSTEXPR14 operator bool() const { return all(); } |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Whether all bits are set |
|
|
|
* @brief Whether all bits are set |
|
|
|
* |
|
|
|
* |
|
|
|
* @see @ref none(), @ref any(), @ref operator bool() |
|
|
|
* @see @ref none(), @ref any(), @ref operator bool() |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
bool all() const; |
|
|
|
MAGNUM_CONSTEXPR14 bool all() const; |
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @brief Whether no bits are set |
|
|
|
* @brief Whether no bits are set |
|
|
|
@ -361,7 +362,7 @@ template<std::size_t size> inline bool BitVector<size>::operator==(const BitVect |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template<std::size_t size> inline bool BitVector<size>::all() const { |
|
|
|
template<std::size_t size> MAGNUM_CONSTEXPR14 inline bool BitVector<size>::all() const { |
|
|
|
/* Check all full segments */ |
|
|
|
/* Check all full segments */ |
|
|
|
for(std::size_t i = 0; i != size/8; ++i) |
|
|
|
for(std::size_t i = 0; i != size/8; ++i) |
|
|
|
if(_data[i] != FullSegmentMask) return false; |
|
|
|
if(_data[i] != FullSegmentMask) return false; |
|
|
|
|