mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(clang-tidy) : modernize-use-nullptr
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user