use nullptr instead of NULL or 0 where applicable

This commit is contained in:
Axel Kohlmeyer
2021-10-12 21:47:02 -04:00
parent dd6f49a753
commit 88631372ec
44 changed files with 283 additions and 282 deletions

View File

@ -25,7 +25,7 @@ using namespace std;
ColMatrix::ColMatrix(){
numrows = 0;
elements = 0;
elements = nullptr;
}
ColMatrix::~ColMatrix(){
@ -34,7 +34,7 @@ ColMatrix::~ColMatrix(){
ColMatrix::ColMatrix(const ColMatrix& A){ // copy constructor
numrows = 0;
elements = 0;
elements = nullptr;
Dim(A.numrows);
for(int i=0;i<numrows;i++)
elements[i] = A.elements[i];
@ -42,7 +42,7 @@ ColMatrix::ColMatrix(const ColMatrix& A){ // copy constructor
ColMatrix::ColMatrix(const VirtualColMatrix& A){ // copy constructor
numrows = 0;
elements = 0;
elements = nullptr;
Dim(A.GetNumRows());
for(int i=0;i<numrows;i++)
elements[i] = A.BasicGet(i);
@ -54,7 +54,7 @@ ColMatrix::ColMatrix(const VirtualMatrix& A){ // copy constructor
exit(1);
}
numrows = 0;
elements = 0;
elements = nullptr;
Dim(A.GetNumRows());
for(int i=0;i<numrows;i++)
elements[i] = A.BasicGet(i,0);
@ -62,7 +62,7 @@ ColMatrix::ColMatrix(const VirtualMatrix& A){ // copy constructor
ColMatrix::ColMatrix(int m){ // size constructor
numrows = 0;
elements = 0;
elements = nullptr;
Dim(m);
}