T2345: Replace instances of NULL with nullptr
The following changes have been applied to src and lib folders: regex replace: ([^"_])NULL ⇒ \1nullptr (8968 chgs in src, 1153 in lib) Manually find/change: (void \*) nullptr ⇒ nullptr (1 case) regex find: ".*?nullptr.*?" Manually ~14 cases back to "NULL" in src, ~2 in lib regex finds a few false positive where nullptr appears between two strings in a function call
This commit is contained in:
@ -16,9 +16,9 @@ class DenseVector : public Vector<T>
|
||||
{
|
||||
public:
|
||||
explicit DenseVector(INDEX n=0, bool z=1) { _create(n,z); }
|
||||
DenseVector(const DenseVector<T> &c) : Vector<T>(), _data(NULL) { _copy(c); }
|
||||
DenseVector(const Vector<T> &c) : Vector<T>(), _data(NULL) { _copy(c); }
|
||||
DenseVector(const T * ptr, INDEX nrows) : Vector<T>(), _data(NULL) { copy(ptr,nrows); }
|
||||
DenseVector(const DenseVector<T> &c) : Vector<T>(), _data(nullptr) { _copy(c); }
|
||||
DenseVector(const Vector<T> &c) : Vector<T>(), _data(nullptr) { _copy(c); }
|
||||
DenseVector(const T * ptr, INDEX nrows) : Vector<T>(), _data(nullptr) { copy(ptr,nrows); }
|
||||
virtual ~DenseVector() { _delete(); }
|
||||
|
||||
//* resizes the Vector, ignores nCols, optionally copys what fits
|
||||
@ -123,7 +123,7 @@ template <typename T>
|
||||
inline void DenseVector<T>::_create(INDEX n, bool zero)
|
||||
{
|
||||
_size=n;
|
||||
_data = _size ? new T [_size] : NULL ;
|
||||
_data = _size ? new T [_size] : nullptr ;
|
||||
if (zero) this->zero();
|
||||
}
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user