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