(clang-tidy) : modernize-use-nullptr

This commit is contained in:
Magne Sjaastad
2018-02-18 18:56:43 +01:00
parent 69875eec8f
commit 1ae30ef11a
195 changed files with 552 additions and 552 deletions

View File

@@ -73,13 +73,13 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromNameAndType(cons
if (!eclipseCase || !eclipseCase->results(porosityModel) || !eclipseCase->activeCellInfo(porosityModel))
{
return NULL;
return nullptr;
}
size_t scalarSetIndex = eclipseCase->results(porosityModel)->findScalarResultIndex(resultType, uiResultName);
if (scalarSetIndex == cvf::UNDEFINED_SIZE_T)
{
return NULL;
return nullptr;
}
cvf::ref<RigResultAccessor> derivedCandidate = createDerivedResultAccessor(eclipseCase,
@@ -155,13 +155,13 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createNativeFromUiResultNa
if (!eclipseCase || !eclipseCase->results(porosityModel) || !eclipseCase->activeCellInfo(porosityModel))
{
return NULL;
return nullptr;
}
size_t scalarSetIndex = eclipseCase->results(porosityModel)->findScalarResultIndex(uiResultName);
if (scalarSetIndex == cvf::UNDEFINED_SIZE_T)
{
return NULL;
return nullptr;
}
return createFromResultIdx(eclipseCase, gridIndex, porosityModel, timeStepIndex, scalarSetIndex);
@@ -323,10 +323,10 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromResultIdx(const
return new RigHugeValResultAccessor;
}
if (!eclipseCase) return NULL;
if (!eclipseCase) return nullptr;
const RigGridBase* grid = eclipseCase->grid(gridIndex);
if (!grid) return NULL;
if (!grid) return nullptr;
const std::vector< std::vector<double> >& scalarSetResults = eclipseCase->results(porosityModel)->cellScalarResults(resultIndex);
@@ -335,7 +335,7 @@ cvf::ref<RigResultAccessor> RigResultAccessorFactory::createFromResultIdx(const
return new RigHugeValResultAccessor;
}
const std::vector<double>* resultValues = NULL;
const std::vector<double>* resultValues = nullptr;
if (timeStepIndex < scalarSetResults.size())
{
resultValues = &(scalarSetResults[timeStepIndex]);