From bbda7f30a2d5784276db26b7f79570baff55928d Mon Sep 17 00:00:00 2001 From: Rebecca Cox Date: Tue, 16 Jan 2018 16:49:28 +0100 Subject: [PATCH] NULL -> nullptr --- .../ProjectDataModel/RimProject.cpp | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/ApplicationCode/ProjectDataModel/RimProject.cpp b/ApplicationCode/ProjectDataModel/RimProject.cpp index 10898f4bda..fbf8cffe88 100644 --- a/ApplicationCode/ProjectDataModel/RimProject.cpp +++ b/ApplicationCode/ProjectDataModel/RimProject.cpp @@ -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& 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 views = rimCase->views(); for (size_t viewIdx = 0; viewIdx < views.size(); viewIdx++)