Browse Source

Fixed BitVector::full() for BitVectors with size 0

tempestpy_adaptions
Tim Quatmann 6 years ago
parent
commit
004466b83f
  1. 3
      src/storm/storage/BitVector.cpp
  2. 1
      src/storm/storage/BitVector.h

3
src/storm/storage/BitVector.cpp

@ -566,6 +566,9 @@ namespace storm {
} }
bool BitVector::full() const { bool BitVector::full() const {
if (bitCount == 0) {
return true;
}
// Check that all buckets except the last one have all bits set. // Check that all buckets except the last one have all bits set.
uint64_t* last = buckets + bucketCount() - 1; uint64_t* last = buckets + bucketCount() - 1;
for (uint64_t const* it = buckets; it < last; ++it) { for (uint64_t const* it = buckets; it < last; ++it) {

1
src/storm/storage/BitVector.h

@ -417,6 +417,7 @@ namespace storm {
/*! /*!
* Retrievs whether all bits are set in this bit vector. * Retrievs whether all bits are set in this bit vector.
* If the bit vector has size 0, this method always returns true.
* *
* @return True iff all bits in the bit vector are set. * @return True iff all bits in the bit vector are set.
*/ */

Loading…
Cancel
Save