Skip to content

Commit f5c4a65

Browse files
committed
Last of the nullptr
1 parent ef7a2e5 commit f5c4a65

File tree

155 files changed

+827
-827
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+827
-827
lines changed

src/Core/Algorithms/BrainStimulator/SimulateForwardMagneticFieldAlgorithm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class CalcFMField
6565
public:
6666

6767
CalcFMField(const AlgorithmBase* algo) : algo_(algo),
68-
np_(-1),efld_(0),ctfld_(0),dipfld_(0),detfld_(0),emsh_(0),ctmsh_(0),dipmsh_(0),detmsh_(0),magfld_(0),magmagfld_(0)
68+
np_(-1),efld_(nullptr),ctfld_(nullptr),dipfld_(nullptr),detfld_(nullptr),emsh_(nullptr),ctmsh_(nullptr),dipmsh_(nullptr),detmsh_(nullptr),magfld_(nullptr),magmagfld_(nullptr)
6969
{
7070
}
7171

src/Core/Algorithms/DataIO/EigenMatrixFromScirunAsciiFormatConverter.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ namespace internal
4747
class SCISHARE EigenMatrixFromScirunAsciiFormatConverter
4848
{
4949
public:
50-
explicit EigenMatrixFromScirunAsciiFormatConverter(const Utility::ProgressReporter* reporter = 0);
50+
explicit EigenMatrixFromScirunAsciiFormatConverter(const Utility::ProgressReporter* reporter = nullptr);
5151
Core::Datatypes::MatrixHandle make(const std::string& matFile);
5252

5353
Core::Datatypes::SparseRowMatrixHandle makeSparse(const std::string& matFile);

src/Core/Algorithms/Field/Tests/RefineTetMeshLocallyAlgoTests.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ FieldList LoadAllCasesInputField()
5353
if (!(i==31 || i==47 || i==55 || i==59 || i==61 || i==62))
5454
{
5555
auto file = (TestResources::rootDir() / "Fields/refinetetmeshlocally/all57outof64case_input/").string() + std::to_string(i) + ".mat";
56-
FieldHandle field = MatlabField_reader(0, file.c_str());
56+
FieldHandle field = MatlabField_reader(nullptr, file.c_str());
5757
result.push_back(field);
5858
}
5959
}
@@ -70,7 +70,7 @@ FieldList LoadAllCasesResultField()
7070
auto str = file.string();
7171
str.append(std::to_string(i));
7272
str.append(".mat");
73-
result.push_back(MatlabField_reader(0, str.c_str()));
73+
result.push_back(MatlabField_reader(nullptr, str.c_str()));
7474
}
7575

7676
return result;

src/Core/Algorithms/Legacy/Converter/FieldToNrrd.cc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ bool FieldToNrrdAlgoT::scalarFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
9292
dim[2] = static_cast<size_t>(sz[2]);
9393
nrrdAlloc_nva(nrrd,datatype,nrrddim,dim);
9494

95-
if (nrrd->data == 0)
95+
if (nrrd->data == nullptr)
9696
{
9797
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
9898
return (false);
@@ -119,7 +119,7 @@ bool FieldToNrrdAlgoT::scalarFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
119119
dim[2] = static_cast<size_t>(sz[2]);
120120
nrrdAlloc_nva(nrrd,datatype,nrrddim,dim);
121121

122-
if (nrrd->data == 0)
122+
if (nrrd->data == nullptr)
123123
{
124124
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
125125
return (false);
@@ -144,7 +144,7 @@ bool FieldToNrrdAlgoT::scalarFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
144144
dim[1] = static_cast<size_t>(sz[1]);
145145
nrrdAlloc_nva(nrrd,datatype,nrrddim,dim);
146146

147-
if (nrrd->data == 0)
147+
if (nrrd->data == nullptr)
148148
{
149149
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
150150
return (false);
@@ -169,7 +169,7 @@ bool FieldToNrrdAlgoT::scalarFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
169169
dim[1] = static_cast<size_t>(sz[1]);
170170
nrrdAlloc_nva(nrrd,datatype,nrrddim,dim);
171171

172-
if (nrrd->data == 0)
172+
if (nrrd->data == nullptr)
173173
{
174174
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
175175
return (false);
@@ -193,7 +193,7 @@ bool FieldToNrrdAlgoT::scalarFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
193193
dim[0] = static_cast<size_t>(sz[0]);
194194
nrrdAlloc_nva(nrrd,datatype,nrrddim,dim);
195195

196-
if (nrrd->data == 0)
196+
if (nrrd->data == nullptr)
197197
{
198198
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
199199
return (false);
@@ -218,7 +218,7 @@ bool FieldToNrrdAlgoT::scalarFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
218218
dim[0] = static_cast<size_t>(sz[0]);
219219
nrrdAlloc_nva(nrrd,datatype,nrrddim,dim);
220220

221-
if (nrrd->data == 0)
221+
if (nrrd->data == nullptr)
222222
{
223223
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
224224
return (false);
@@ -308,7 +308,7 @@ bool FieldToNrrdAlgoT::vectorFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
308308
dim[3] = static_cast<size_t>(sz[2]);
309309
nrrdAlloc_nva(nrrd,nrrdTypeDouble,nrrddim,dim);
310310

311-
if (nrrd->data == 0)
311+
if (nrrd->data == nullptr)
312312
{
313313
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
314314
return (false);
@@ -349,7 +349,7 @@ bool FieldToNrrdAlgoT::vectorFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
349349
dim[3] = static_cast<size_t>(sz[2]);
350350
nrrdAlloc_nva(nrrd,nrrdTypeDouble,nrrddim,dim);
351351

352-
if (nrrd->data == 0)
352+
if (nrrd->data == nullptr)
353353
{
354354
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
355355
return (false);
@@ -389,7 +389,7 @@ bool FieldToNrrdAlgoT::vectorFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
389389
dim[2] = static_cast<size_t>(sz[1]);
390390
nrrdAlloc_nva(nrrd,nrrdTypeDouble,nrrddim,dim);
391391

392-
if (nrrd->data == 0)
392+
if (nrrd->data == nullptr)
393393
{
394394
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
395395
return (false);
@@ -429,7 +429,7 @@ bool FieldToNrrdAlgoT::vectorFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
429429
dim[2] = static_cast<size_t>(sz[1]);
430430
nrrdAlloc_nva(nrrd,nrrdTypeDouble,nrrddim,dim);
431431

432-
if (nrrd->data == 0)
432+
if (nrrd->data == nullptr)
433433
{
434434
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
435435
return (false);
@@ -468,7 +468,7 @@ bool FieldToNrrdAlgoT::vectorFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
468468
dim[1] = static_cast<size_t>(sz[0]);
469469
nrrdAlloc_nva(nrrd,nrrdTypeDouble,nrrddim,dim);
470470

471-
if (nrrd->data == 0)
471+
if (nrrd->data == nullptr)
472472
{
473473
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
474474
return (false);
@@ -507,7 +507,7 @@ bool FieldToNrrdAlgoT::vectorFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
507507
dim[1] = static_cast<size_t>(sz[0]);
508508
nrrdAlloc_nva(nrrd,nrrdTypeDouble,nrrddim,dim);
509509

510-
if (nrrd->data == 0)
510+
if (nrrd->data == nullptr)
511511
{
512512
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
513513
return (false);
@@ -616,7 +616,7 @@ bool FieldToNrrdAlgoT::tensorFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
616616
dim[3] = static_cast<size_t>(sz[2]);
617617
nrrdAlloc_nva(nrrd,nrrdTypeDouble,nrrddim,dim);
618618

619-
if (nrrd->data == 0)
619+
if (nrrd->data == nullptr)
620620
{
621621
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
622622
return (false);
@@ -660,7 +660,7 @@ bool FieldToNrrdAlgoT::tensorFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
660660
dim[3] = static_cast<size_t>(sz[2]);
661661
nrrdAlloc_nva(nrrd,nrrdTypeDouble,nrrddim,dim);
662662

663-
if (nrrd->data == 0)
663+
if (nrrd->data == nullptr)
664664
{
665665
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
666666
return (false);
@@ -704,7 +704,7 @@ bool FieldToNrrdAlgoT::tensorFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
704704
dim[2] = static_cast<size_t>(sz[1]);
705705
nrrdAlloc_nva(nrrd,nrrdTypeDouble,nrrddim,dim);
706706

707-
if (nrrd->data == 0)
707+
if (nrrd->data == nullptr)
708708
{
709709
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
710710
return (false);
@@ -747,7 +747,7 @@ bool FieldToNrrdAlgoT::tensorFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
747747
dim[2] = static_cast<size_t>(sz[1]);
748748
nrrdAlloc_nva(nrrd,nrrdTypeDouble,nrrddim,dim);
749749

750-
if (nrrd->data == 0)
750+
if (nrrd->data == nullptr)
751751
{
752752
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
753753
return (false);
@@ -790,7 +790,7 @@ bool FieldToNrrdAlgoT::tensorFieldToNrrd(LoggerHandle pr,FieldHandle input, Nrrd
790790
dim[1] = static_cast<size_t>(sz[0]);
791791
nrrdAlloc_nva(nrrd,nrrdTypeDouble,nrrddim,dim);
792792

793-
if (nrrd->data == 0)
793+
if (nrrd->data == nullptr)
794794
{
795795
pr->error("FieldToNrrd: Could not allocate enough space for new Nrrd");
796796
return (false);

src/Core/Algorithms/Legacy/Converter/NrrdToField.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ bool NrrdToFieldAlgoT::nrrdToField(LoggerHandle pr,NrrdDataHandle input, FieldHa
331331
if (datalocation == "Node")
332332
{
333333
FieldInformation fi(SCANLINEMESH_E,LINEARDATA_E,DOUBLE_E);
334-
fi.set_data_typeT((T*)0);
334+
fi.set_data_typeT((T*)nullptr);
335335

336336
MeshHandle mesh = CreateMesh(fi,rsize[0],Point(rmin[0],0.0,0.0),Point(rmax[0],0.0,0.0));
337337
output = CreateField(fi,mesh);
@@ -360,7 +360,7 @@ bool NrrdToFieldAlgoT::nrrdToField(LoggerHandle pr,NrrdDataHandle input, FieldHa
360360
else if (datalocation == "Element")
361361
{
362362
FieldInformation fi(SCANLINEMESH_E,CONSTANTDATA_E,DOUBLE_E);
363-
fi.set_data_typeT( static_cast<T*>(0) );
363+
fi.set_data_typeT( static_cast<T*>(nullptr) );
364364

365365
MeshHandle mesh = CreateMesh(fi,rsize[0]+1,Point(rmin[0],0.0,0.0),Point(rmax[0],0.0,0.0));
366366
output = CreateField(fi,mesh);
@@ -397,7 +397,7 @@ bool NrrdToFieldAlgoT::nrrdToField(LoggerHandle pr,NrrdDataHandle input, FieldHa
397397
if (datalocation == "Node")
398398
{
399399
FieldInformation fi(IMAGEMESH_E,LINEARDATA_E,DOUBLE_E);
400-
fi.set_data_typeT( static_cast<T*>(0) );
400+
fi.set_data_typeT( static_cast<T*>(nullptr) );
401401

402402
MeshHandle mesh = CreateMesh(fi,rsize[0],rsize[1],Point(rmin[0],rmin[1],0.0),Point(rmax[0],rmax[1],0.0));
403403
output = CreateField(fi,mesh);
@@ -426,7 +426,7 @@ bool NrrdToFieldAlgoT::nrrdToField(LoggerHandle pr,NrrdDataHandle input, FieldHa
426426
else if (datalocation == "Element")
427427
{
428428
FieldInformation fi(IMAGEMESH_E,CONSTANTDATA_E,DOUBLE_E);
429-
fi.set_data_typeT( static_cast<T*>(0) );
429+
fi.set_data_typeT( static_cast<T*>(nullptr) );
430430

431431
MeshHandle mesh = CreateMesh(fi,rsize[0]+1,rsize[1]+1,Point(rmin[0],rmin[1],0.0),Point(rmax[0],rmax[1],0.0));
432432
output = CreateField(fi,mesh);
@@ -463,7 +463,7 @@ bool NrrdToFieldAlgoT::nrrdToField(LoggerHandle pr,NrrdDataHandle input, FieldHa
463463
if (datalocation == "Node")
464464
{
465465
FieldInformation fi(LATVOLMESH_E,LINEARDATA_E,DOUBLE_E);
466-
fi.set_data_typeT( static_cast<T*>(0) );
466+
fi.set_data_typeT( static_cast<T*>(nullptr) );
467467

468468
MeshHandle mesh = CreateMesh(fi,rsize[0],rsize[1],rsize[2],Point(rmin[0],rmin[1],rmin[2]),Point(rmax[0],rmax[1],rmax[2]));
469469
output = CreateField(fi,mesh);
@@ -492,7 +492,7 @@ bool NrrdToFieldAlgoT::nrrdToField(LoggerHandle pr,NrrdDataHandle input, FieldHa
492492
else if (datalocation == "Element")
493493
{
494494
FieldInformation fi(LATVOLMESH_E,CONSTANTDATA_E,DOUBLE_E);
495-
fi.set_data_typeT( static_cast<T*>(0) );
495+
fi.set_data_typeT( static_cast<T*>(nullptr) );
496496

497497
MeshHandle mesh = CreateMesh(fi,rsize[0]+1,rsize[1]+1,rsize[2]+1,Point(rmin[0],rmin[1],rmin[2]),Point(rmax[0],rmax[1],rmax[2]));
498498
output = CreateField(fi,mesh);
@@ -543,7 +543,7 @@ bool NrrdToFieldAlgoT::nrrdToVectorField(LoggerHandle pr,NrrdDataHandle input, F
543543
M[1][0] = 0.0; M[1][1] = 1.0; M[1][2] = 0.0;
544544
M[2][0] = 0.0; M[2][1] = 0.0; M[2][2] = 1.0;
545545

546-
if (nrrd == 0)
546+
if (nrrd == nullptr)
547547
{
548548
pr->error("NrrdToVectorField: NrrdData does not contain Nrrd");
549549
return (false);
@@ -1078,7 +1078,7 @@ bool NrrdToFieldAlgoT::nrrdToTensorField(LoggerHandle pr,NrrdDataHandle input, F
10781078
M[1][0] = 0.0; M[1][1] = 1.0; M[1][2] = 0.0;
10791079
M[2][0] = 0.0; M[2][1] = 0.0; M[2][2] = 1.0;
10801080

1081-
if (nrrd == 0)
1081+
if (nrrd == nullptr)
10821082
{
10831083
pr->error("NrrdToTensorField: NrrdData does not contain Nrrd");
10841084
return (false);

src/Core/Algorithms/Legacy/DataIO/DataIOAlgo.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ bool DataIOAlgo::readNrrd(const std::string& filename, NrrdDataHandle& nrrd, con
163163
if (!nrrd) return (false);
164164

165165
NrrdData::lock_teem();
166-
if (nrrdLoad(nrrd->getNrrd(), airStrdup(filename.c_str()), 0))
166+
if (nrrdLoad(nrrd->getNrrd(), airStrdup(filename.c_str()), nullptr))
167167
{
168168
char *err = biffGetDone(NRRD);
169169
error("Could not read nrrd '" + filename + "' because teem crashed for the following reason: " + err);

src/Core/Algorithms/Legacy/Fields/DistanceField/CalculateDistanceField.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class CalculateDistanceFieldP : public Interruptible
6666
{
6767
public:
6868
CalculateDistanceFieldP(VMesh* imesh, VMesh* objmesh, VField* ofield, const AlgorithmBase* algo) :
69-
imesh(imesh), objmesh(objmesh), objfield(0), ofield(ofield), vfield(0), algo_(algo) {}
69+
imesh(imesh), objmesh(objmesh), objfield(nullptr), ofield(ofield), vfield(nullptr), algo_(algo) {}
7070

7171
CalculateDistanceFieldP(VMesh* imesh, VMesh* objmesh, VField* objfield, VField* ofield, VField* vfield, const AlgorithmBase* algo) :
7272
imesh(imesh), objmesh(objmesh), objfield(objfield), ofield(ofield), vfield(vfield), algo_(algo) {}

src/Core/Algorithms/Legacy/Fields/DistanceField/CalculateInsideWhichFieldAlgorithm.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ FieldHandle CalculateInsideWhichFieldAlgorithm::run(FieldHandle input,const std:
136136
else
137137
ofield->copy_values(ifield);
138138

139-
std::vector<VMesh*> objmesh(objField.size(),0);
139+
std::vector<VMesh*> objmesh(objField.size(),nullptr);
140140

141141
if(ofield->basis_order()==0)
142142
{

src/Core/Algorithms/Legacy/Fields/Mapping/BuildMappingMatrixAlgo.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ namespace detail
6464
{
6565
public:
6666
BuildMappingMatrixPAlgoBase(const std::string& barrierName, int nproc) :
67-
sfield_(0), dfield_(0), smesh_(0), dmesh_(0), rr_(0), cc_(0), vv_(0),
68-
maxdist_(0), algo_(0), nproc_(nproc),
67+
sfield_(nullptr), dfield_(nullptr), smesh_(nullptr), dmesh_(nullptr), rr_(nullptr), cc_(nullptr), vv_(nullptr),
68+
maxdist_(0), algo_(nullptr), nproc_(nproc),
6969
barrier_(barrierName, nproc) {}
7070
VField* sfield_;
7171
VField* dfield_;

src/Core/Algorithms/Legacy/Fields/Mapping/MapFieldDataFromSourceToDestination.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ namespace detail
6969
{
7070
public:
7171
explicit MapFieldDataFromSourceToDestinationPAlgoBase(const std::string& name, int nproc) :
72-
sfield_(0), dfield_(0), smesh_(0), dmesh_(0), maxdist_(0), algo_(0),
72+
sfield_(nullptr), dfield_(nullptr), smesh_(nullptr), dmesh_(nullptr), maxdist_(0), algo_(nullptr),
7373
barrier_(name, nproc), nproc_(nproc) {}
7474

7575
virtual ~MapFieldDataFromSourceToDestinationPAlgoBase() {}

0 commit comments

Comments
 (0)