diff --git a/Code/DataStructs/ExplicitBitVect.cpp b/Code/DataStructs/ExplicitBitVect.cpp index 792ed98c1..326d5f95e 100644 --- a/Code/DataStructs/ExplicitBitVect.cpp +++ b/Code/DataStructs/ExplicitBitVect.cpp @@ -15,7 +15,6 @@ #include "base64.h" #include #include -#include #ifdef WIN32 #include #endif @@ -24,10 +23,11 @@ ExplicitBitVect::ExplicitBitVect(unsigned int size, bool bitsSet) { d_size=0;dp_bits = 0;d_numOnBits=0; + _initForSize(size); if (bitsSet) { - _initForSizeWithBitsSet(size); - } else { - _initForSize(size); + dp_bits->set(); // set all bits to 1 + //dp_bits.resize(size, true); + d_numOnBits = size; } } ExplicitBitVect::ExplicitBitVect(const std::string &s) @@ -145,13 +145,6 @@ ExplicitBitVect::ExplicitBitVect(const char *data,const unsigned int dataLen) d_numOnBits=0; }; - void ExplicitBitVect::_initForSizeWithBitsSet(const unsigned int size) { - d_size = size; - delete dp_bits; - dp_bits = new boost::dynamic_bitset<>(size, (unsigned long)(pow(2, size)-1)); - d_numOnBits = size; - } - ExplicitBitVect::~ExplicitBitVect() { delete dp_bits; dp_bits=NULL; diff --git a/Code/DataStructs/ExplicitBitVect.h b/Code/DataStructs/ExplicitBitVect.h index 7cc4cb9c2..7a021d04d 100644 --- a/Code/DataStructs/ExplicitBitVect.h +++ b/Code/DataStructs/ExplicitBitVect.h @@ -70,7 +70,6 @@ private: unsigned int d_size; unsigned int d_numOnBits; void _initForSize(const unsigned int size); - void _initForSizeWithBitsSet(const unsigned int size); };