include/libtorrent/bitfield.hpp
// returns true if all bits in the bitfield are set
returns true if all bits in the bitfield are set
returns true if all bits in the bitfield are set
bool all_set() const
		{
			const int words = size() / 32;
			for (int i = 0; i < words; ++i)
			{
				if (m_buf[i] != 0xffffffff) return false;
			}
			int rest = size() & 31;
			boost::uint32_t mask = htonl(0xffffffff << (32-rest));
			if (rest > 0 && (m_buf[words] & mask) != mask)
				return false;
			return true;
		}
bool all_set ( ) const { const int words = size ( ) / 32 ; for ( int i = 0 ; i < words ; ++ i ) { if ( m_buf [ i ] != 0xffffffff ) return false ; } int rest = size ( ) & 31 ; boost :: uint32_t mask = htonl ( 0xffffffff << ( 32 - rest ) ) ; if ( rest > 0 && ( m_buf [ words ] & mask ) != mask ) return false ; return true ; }
returns true if all bits in the bitfield are set
returns true if all bits in the bitfield are set