Modernization: use nullptr (#3143)

This commit is contained in:
Eisuke Kawashima
2020-05-25 16:40:01 +09:00
committed by GitHub
parent 29ad06f099
commit e86e2c1d5d
88 changed files with 411 additions and 402 deletions

View File

@@ -33,16 +33,16 @@ typedef IntSet::const_iterator IntSetConstIter;
*/
class RDKIT_DATASTRUCTS_EXPORT SparseBitVect : public BitVect {
public:
SparseBitVect() : dp_bits(0), d_size(0){};
SparseBitVect() : dp_bits(nullptr), d_size(0){};
//! initialize with a particular size;
explicit SparseBitVect(unsigned int size) : dp_bits(0), d_size(0) {
explicit SparseBitVect(unsigned int size) : dp_bits(nullptr), d_size(0) {
_initForSize(size);
};
//! copy constructor
SparseBitVect(const SparseBitVect &other) : BitVect(other) {
d_size = 0;
dp_bits = 0;
dp_bits = nullptr;
_initForSize(other.getNumBits());
IntSet *bv = other.dp_bits;
std::copy(bv->begin(), bv->end(), std::inserter(*dp_bits, dp_bits->end()));