NULL -> nullptr

This commit is contained in:
Rebecca Cox 2018-01-16 16:49:28 +01:00
parent b6a7dcb7b5
commit bbda7f30a2

View File

@ -206,7 +206,7 @@ void RimProject::close()
calculationCollection->deleteAllContainedObjects();
delete viewLinkerCollection->viewLinker();
viewLinkerCollection->viewLinker = NULL;
viewLinkerCollection->viewLinker = nullptr;
fileName = "";
@ -262,7 +262,7 @@ void RimProject::initScriptDirectories()
}
// Find largest used groupId read from file and make sure all groups have a valid groupId
RimEclipseCaseCollection* analysisModels = activeOilField() ? activeOilField()->analysisModels() : NULL;
RimEclipseCaseCollection* analysisModels = activeOilField() ? activeOilField()->analysisModels() : nullptr;
if (analysisModels)
{
int largestGroupId = -1;
@ -311,7 +311,7 @@ void RimProject::initAfterRead()
// Handle old project files with obsolete structure.
// Move caseGroupsObsolete and casesObsolete to oilFields()[idx]->analysisModels()
RimEclipseCaseCollection* analysisModels = activeOilField() ? activeOilField()->analysisModels() : NULL;
RimEclipseCaseCollection* analysisModels = activeOilField() ? activeOilField()->analysisModels() : nullptr;
bool movedOneRimIdenticalGridCaseGroup = false;
for (size_t cgIdx = 0; cgIdx < caseGroupsObsolete.size(); ++cgIdx)
{
@ -335,7 +335,7 @@ void RimProject::initAfterRead()
if (analysisModels)
{
RimEclipseCase* sourceCase = casesObsolete[cIdx];
casesObsolete.set(cIdx, NULL);
casesObsolete.set(cIdx, nullptr);
analysisModels->cases.push_back(sourceCase);
//printf("Moved m_project->casesObsolete[%i] to first oil fields analysis models\n", cIdx);
movedOneRimCase = true; // moved at least one so assume the others will be moved too...
@ -357,7 +357,7 @@ void RimProject::initAfterRead()
for (size_t oilFieldIdx = 0; oilFieldIdx < oilFields().size(); oilFieldIdx++)
{
RimOilField* oilField = oilFields[oilFieldIdx];
if (oilField == NULL || oilField->wellPathCollection == NULL) continue;
if (oilField == nullptr || oilField->wellPathCollection == nullptr) continue;
}
}
@ -458,16 +458,16 @@ void RimProject::setProjectFileNameAndUpdateDependencies(const QString& fileName
// Update path to well path file cache
for(RimOilField* oilField: oilFields)
{
if (oilField == NULL) continue;
if (oilField->wellPathCollection() != NULL)
if (oilField == nullptr) continue;
if (oilField->wellPathCollection() != nullptr)
{
oilField->wellPathCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
}
if (oilField->formationNamesCollection() != NULL)
if (oilField->formationNamesCollection() != nullptr)
{
oilField->formationNamesCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
}
if (oilField->summaryCaseMainCollection() != NULL) {
if (oilField->summaryCaseMainCollection() != nullptr) {
oilField->summaryCaseMainCollection()->updateFilePathsFromProjectPath(newProjectPath, oldProjectPath);
}
@ -537,7 +537,7 @@ void RimProject::allCases(std::vector<RimCase*>& cases)
{
// Load the Main case of each IdenticalGridCaseGroup
RimIdenticalGridCaseGroup* cg = analysisModels->caseGroups[cgIdx];
if (cg == NULL) continue;
if (cg == nullptr) continue;
if (cg->statisticsCaseCollection())
{
@ -685,7 +685,7 @@ void RimProject::createDisplayModelAndRedrawAllViews()
for (size_t caseIdx = 0; caseIdx < cases.size(); caseIdx++)
{
RimCase* rimCase = cases[caseIdx];
if (rimCase == NULL) continue;
if (rimCase == nullptr) continue;
std::vector<Rim3dView*> views = rimCase->views();
for (size_t viewIdx = 0; viewIdx < views.size(); viewIdx++)