(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

@ -216,7 +216,7 @@ RiaApplication::RiaApplication(int& argc, char** argv)
setWindowIcon(QIcon(":/AppLogo48x48.png")); setWindowIcon(QIcon(":/AppLogo48x48.png"));
m_socketServer = new RiaSocketServer( this); m_socketServer = new RiaSocketServer( this);
m_workerProcess = NULL; m_workerProcess = nullptr;
#ifdef WIN32 #ifdef WIN32
m_startupDefaultDirectory = QDir::homePath(); m_startupDefaultDirectory = QDir::homePath();
@ -393,10 +393,10 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
closeProject(); closeProject();
QString tmp = QString("Unknown project file version detected in file \n%1\n\nCould not open project.").arg(projectFileName); QString tmp = QString("Unknown project file version detected in file \n%1\n\nCould not open project.").arg(projectFileName);
QMessageBox::warning(NULL, "Error when opening project file", tmp); QMessageBox::warning(nullptr, "Error when opening project file", tmp);
RiuMainWindow* mainWnd = RiuMainWindow::instance(); RiuMainWindow* mainWnd = RiuMainWindow::instance();
mainWnd->setPdmRoot(NULL); mainWnd->setPdmRoot(nullptr);
// Delete all object possibly generated by readFile() // Delete all object possibly generated by readFile()
delete m_project; delete m_project;
@ -445,8 +445,8 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
for (size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++) for (size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++)
{ {
RimOilField* oilField = m_project->oilFields[oilFieldIdx]; RimOilField* oilField = m_project->oilFields[oilFieldIdx];
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : NULL; RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : nullptr;
if (analysisModels == NULL) continue; if (analysisModels == nullptr) continue;
for (size_t cgIdx = 0; cgIdx < analysisModels->caseGroups.size(); ++cgIdx) for (size_t cgIdx = 0; cgIdx < analysisModels->caseGroups.size(); ++cgIdx)
{ {
@ -460,8 +460,8 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
for(RimOilField* oilField: m_project->oilFields) for(RimOilField* oilField: m_project->oilFields)
{ {
if (oilField == NULL) continue; if (oilField == nullptr) continue;
if(oilField->formationNamesCollection() != NULL) if(oilField->formationNamesCollection() != nullptr)
{ {
oilField->formationNamesCollection()->readAllFormationNames(); oilField->formationNamesCollection()->readAllFormationNames();
} }
@ -472,8 +472,8 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
for (size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++) for (size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++)
{ {
RimOilField* oilField = m_project->oilFields[oilFieldIdx]; RimOilField* oilField = m_project->oilFields[oilFieldIdx];
if (oilField == NULL) continue; if (oilField == nullptr) continue;
if (oilField->wellPathCollection == NULL) if (oilField->wellPathCollection == nullptr)
{ {
//printf("Create well path collection for oil field %i in loadProject.\n", oilFieldIdx); //printf("Create well path collection for oil field %i in loadProject.\n", oilFieldIdx);
oilField->wellPathCollection = new RimWellPathCollection(); oilField->wellPathCollection = new RimWellPathCollection();
@ -488,7 +488,7 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
for (RimOilField* oilField: m_project->oilFields) for (RimOilField* oilField: m_project->oilFields)
{ {
if (oilField == NULL) continue; if (oilField == nullptr) continue;
// Temporary // Temporary
if(!oilField->summaryCaseMainCollection()) if(!oilField->summaryCaseMainCollection())
{ {
@ -537,7 +537,7 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
for (size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++) for (size_t oilFieldIdx = 0; oilFieldIdx < m_project->oilFields().size(); oilFieldIdx++)
{ {
RimOilField* oilField = m_project->oilFields[oilFieldIdx]; RimOilField* oilField = m_project->oilFields[oilFieldIdx];
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : NULL; RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : nullptr;
if (analysisModels) if (analysisModels)
{ {
analysisModels->recomputeStatisticsForAllCaseGroups(); analysisModels->recomputeStatisticsForAllCaseGroups();
@ -641,7 +641,7 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RiaApplication::loadProject(const QString& projectFileName) bool RiaApplication::loadProject(const QString& projectFileName)
{ {
return loadProject(projectFileName, PLA_NONE, NULL); return loadProject(projectFileName, PLA_NONE, nullptr);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -789,12 +789,12 @@ void RiaApplication::storeTreeViewState()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiaApplication::addWellPathsToModel(QList<QString> wellPathFilePaths) void RiaApplication::addWellPathsToModel(QList<QString> wellPathFilePaths)
{ {
if (m_project == NULL || m_project->oilFields.size() < 1) return; if (m_project == nullptr || m_project->oilFields.size() < 1) return;
RimOilField* oilField = m_project->activeOilField(); RimOilField* oilField = m_project->activeOilField();
if (oilField == NULL) return; if (oilField == nullptr) return;
if (oilField->wellPathCollection == NULL) if (oilField->wellPathCollection == nullptr)
{ {
//printf("Create well path collection.\n"); //printf("Create well path collection.\n");
oilField->wellPathCollection = new RimWellPathCollection(); oilField->wellPathCollection = new RimWellPathCollection();
@ -895,7 +895,7 @@ bool RiaApplication::saveProjectPromptForFileName()
startPath += "/ResInsightProject.rsp"; startPath += "/ResInsightProject.rsp";
} }
QString fileName = QFileDialog::getSaveFileName(NULL, tr("Save File"), startPath, tr("Project Files (*.rsp);;All files(*.*)")); QString fileName = QFileDialog::getSaveFileName(nullptr, tr("Save File"), startPath, tr("Project Files (*.rsp);;All files(*.*)"));
if (fileName.isEmpty()) if (fileName.isEmpty())
{ {
return false; return false;
@ -972,7 +972,7 @@ bool RiaApplication::saveProjectAs(const QString& fileName)
if (!m_project->writeFile()) if (!m_project->writeFile())
{ {
QMessageBox::warning(NULL, "Error when saving project file", QString("Not possible to save project file. Make sure you have sufficient access rights.\n\nProject file location : %1").arg(fileName)); QMessageBox::warning(nullptr, "Error when saving project file", QString("Not possible to save project file. Make sure you have sufficient access rights.\n\nProject file location : %1").arg(fileName));
return false; return false;
} }
@ -1098,10 +1098,10 @@ bool RiaApplication::openOdbCaseFromFile(const QString& fileName)
geoMechCase->setFileName(fileName); geoMechCase->setFileName(fileName);
geoMechCase->caseUserDescription = caseName; geoMechCase->caseUserDescription = caseName;
RimGeoMechModels* geoMechModelCollection = m_project->activeOilField() ? m_project->activeOilField()->geoMechModels() : NULL; RimGeoMechModels* geoMechModelCollection = m_project->activeOilField() ? m_project->activeOilField()->geoMechModels() : nullptr;
// Create the geoMech model container if it is not there already // Create the geoMech model container if it is not there already
if (geoMechModelCollection == NULL) if (geoMechModelCollection == nullptr)
{ {
geoMechModelCollection = new RimGeoMechModels(); geoMechModelCollection = new RimGeoMechModels();
m_project->activeOilField()->geoMechModels = geoMechModelCollection; m_project->activeOilField()->geoMechModels = geoMechModelCollection;
@ -1343,7 +1343,7 @@ int RiaApplication::launchUnitTestsWithConsole()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RiaApplication::createMainPlotWindow() void RiaApplication::createMainPlotWindow()
{ {
CVF_ASSERT(m_mainPlotWindow == NULL); CVF_ASSERT(m_mainPlotWindow == nullptr);
m_mainPlotWindow = new RiuMainPlotWindow; m_mainPlotWindow = new RiuMainPlotWindow;
@ -1361,7 +1361,7 @@ void RiaApplication::deleteMainPlotWindow()
if (m_mainPlotWindow) if (m_mainPlotWindow)
{ {
m_mainPlotWindow->deleteLater(); m_mainPlotWindow->deleteLater();
m_mainPlotWindow = NULL; m_mainPlotWindow = nullptr;
} }
} }
@ -1415,7 +1415,7 @@ RiuMainWindowBase* RiaApplication::mainWindowByID(int mainWindowID)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimViewWindow* RiaApplication::activeViewWindow() RimViewWindow* RiaApplication::activeViewWindow()
{ {
RimViewWindow* viewWindow = NULL; RimViewWindow* viewWindow = nullptr;
QWidget* mainWindowWidget = RiaApplication::activeWindow(); QWidget* mainWindowWidget = RiaApplication::activeWindow();
@ -1609,7 +1609,7 @@ void RiaApplication::slotWorkerProcessFinished(int exitCode, QProcess::ExitStatu
{ {
m_workerProcess->close(); m_workerProcess->close();
} }
m_workerProcess = NULL; m_workerProcess = nullptr;
// Either the work process crashed or was aborted by the user // Either the work process crashed or was aborted by the user
if (exitStatus == QProcess::CrashExit) if (exitStatus == QProcess::CrashExit)
@ -1649,7 +1649,7 @@ void RiaApplication::slotWorkerProcessFinished(int exitCode, QProcess::ExitStatu
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RiaApplication::launchProcess(const QString& program, const QStringList& arguments) bool RiaApplication::launchProcess(const QString& program, const QStringList& arguments)
{ {
if (m_workerProcess == NULL) if (m_workerProcess == nullptr)
{ {
// If multiple cases are present, pop the first case ID from the list and set as current case // If multiple cases are present, pop the first case ID from the list and set as current case
if (!m_currentCaseIds.empty()) if (!m_currentCaseIds.empty())
@ -1701,7 +1701,7 @@ bool RiaApplication::launchProcess(const QString& program, const QStringList& ar
if (!m_workerProcess->waitForStarted(1000)) if (!m_workerProcess->waitForStarted(1000))
{ {
m_workerProcess->close(); m_workerProcess->close();
m_workerProcess = NULL; m_workerProcess = nullptr;
m_runningWorkerProcess = false; m_runningWorkerProcess = false;
RiuMainWindow::instance()->processMonitor()->stopMonitorWorkProcess(); RiuMainWindow::instance()->processMonitor()->stopMonitorWorkProcess();
@ -1715,7 +1715,7 @@ bool RiaApplication::launchProcess(const QString& program, const QStringList& ar
} }
else else
{ {
QMessageBox::warning(NULL, "Script execution", "An Octave process is still running. Please stop this process before executing a new script."); QMessageBox::warning(nullptr, "Script execution", "An Octave process is still running. Please stop this process before executing a new script.");
return false; return false;
} }
} }
@ -1825,7 +1825,7 @@ void RiaApplication::terminateProcess()
} }
m_runningWorkerProcess = false; m_runningWorkerProcess = false;
m_workerProcess = NULL; m_workerProcess = nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -92,8 +92,8 @@ bool RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl(const QStr
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
RimProject* project = app->project(); RimProject* project = app->project();
RimEclipseCaseCollection* analysisModels = project->activeOilField() ? project->activeOilField()->analysisModels() : NULL; RimEclipseCaseCollection* analysisModels = project->activeOilField() ? project->activeOilField()->analysisModels() : nullptr;
if (analysisModels == NULL) return false; if (analysisModels == nullptr) return false;
RiuMainWindow::instance()->show(); RiuMainWindow::instance()->show();
@ -114,7 +114,7 @@ bool RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl(const QStr
// Add a corresponding summary case if it exists // Add a corresponding summary case if it exists
{ {
RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : NULL; RimSummaryCaseMainCollection* sumCaseColl = project->activeOilField() ? project->activeOilField()->summaryCaseMainCollection() : nullptr;
if (sumCaseColl) if (sumCaseColl)
{ {
{ {
@ -193,9 +193,9 @@ bool RiaImportEclipseCaseTools::addEclipseCases(const QStringList& fileNames)
// First file is read completely including grid. // First file is read completely including grid.
// The main grid from the first case is reused directly in for the other cases. // The main grid from the first case is reused directly in for the other cases.
// When reading active cell info, only the total cell count is tested for consistency // When reading active cell info, only the total cell count is tested for consistency
RimEclipseResultCase* mainResultCase = NULL; RimEclipseResultCase* mainResultCase = nullptr;
std::vector< std::vector<int> > mainCaseGridDimensions; std::vector< std::vector<int> > mainCaseGridDimensions;
RimIdenticalGridCaseGroup* gridCaseGroup = NULL; RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
RimProject* project = app->project(); RimProject* project = app->project();

View File

@ -157,7 +157,7 @@ void RiaDefaultConsoleLogger::writeToConsole(const std::string& str)
DWORD stringLength = static_cast<DWORD>(str.length()); DWORD stringLength = static_cast<DWORD>(str.length());
unsigned long iDum = 0; unsigned long iDum = 0;
WriteConsoleA(hStdOutputHandle, str.c_str(), stringLength, &iDum, NULL); WriteConsoleA(hStdOutputHandle, str.c_str(), stringLength, &iDum, nullptr);
} }
#else #else
fputs(str.c_str(), stderr); fputs(str.c_str(), stderr);
@ -203,7 +203,7 @@ void RiaLogging::setLoggerInstance(RiaLogger* loggerInstance)
void RiaLogging::deleteLoggerInstance() void RiaLogging::deleteLoggerInstance()
{ {
delete sm_logger; delete sm_logger;
sm_logger = NULL; sm_logger = nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -125,7 +125,7 @@ void RiaProjectModifier::replaceSourceCases(RimProject* project)
{ {
for (RimOilField* oilField : project->oilFields()) for (RimOilField* oilField : project->oilFields())
{ {
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : NULL; RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : nullptr;
if (analysisModels) if (analysisModels)
{ {
for (RimIdenticalGridCaseGroup* caseGroup : analysisModels->caseGroups) for (RimIdenticalGridCaseGroup* caseGroup : analysisModels->caseGroups)
@ -280,7 +280,7 @@ int RiaProjectModifier::firstGroupId(RimProject* project)
for (size_t oilFieldIdx = 0; oilFieldIdx < project->oilFields().size(); oilFieldIdx++) for (size_t oilFieldIdx = 0; oilFieldIdx < project->oilFields().size(); oilFieldIdx++)
{ {
RimOilField* oilField = project->oilFields[oilFieldIdx]; RimOilField* oilField = project->oilFields[oilFieldIdx];
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : NULL; RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : nullptr;
if (analysisModels) if (analysisModels)
{ {
if (analysisModels->caseGroups.size() > 0) if (analysisModels->caseGroups.size() > 0)

View File

@ -47,7 +47,7 @@ void RicEditPreferencesFeature::onActionTriggered(bool isChecked)
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
QStringList tabNames = app->preferences()->tabNames(); QStringList tabNames = app->preferences()->tabNames();
RiuPropertyViewTabWidget propertyDialog(NULL, app->preferences(), "Preferences", tabNames); RiuPropertyViewTabWidget propertyDialog(nullptr, app->preferences(), "Preferences", tabNames);
if (propertyDialog.exec() == QDialog::Accepted) if (propertyDialog.exec() == QDialog::Accepted)
{ {
// Write preferences using QSettings and apply them to the application // Write preferences using QSettings and apply them to the application

View File

@ -50,7 +50,7 @@ void RicHelpAboutFeature::onActionTriggered(bool isChecked)
{ {
this->disableModelChangeContribution(); this->disableModelChangeContribution();
caf::AboutDialog dlg(NULL); caf::AboutDialog dlg(nullptr);
dlg.setApplicationName(RI_APPLICATION_NAME); dlg.setApplicationName(RI_APPLICATION_NAME);
dlg.setApplicationVersion(RiaApplication::getVersionStringApp(true)); dlg.setApplicationVersion(RiaApplication::getVersionStringApp(true));

View File

@ -46,7 +46,7 @@ void RicOpenProjectFeature::onActionTriggered(bool isChecked)
if (!app->askUserToSaveModifiedProject()) return; if (!app->askUserToSaveModifiedProject()) return;
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID"); QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
QString fileName = QFileDialog::getOpenFileName(NULL, "Open ResInsight Project", defaultDir, "ResInsight project (*.rsp *.rip);;All files(*.*)"); QString fileName = QFileDialog::getOpenFileName(nullptr, "Open ResInsight Project", defaultDir, "ResInsight project (*.rsp *.rip);;All files(*.*)");
if (fileName.isEmpty()) return; if (fileName.isEmpty()) return;

View File

@ -49,7 +49,7 @@ void RicAppendIntersectionFeature::onActionTriggered(bool isChecked)
caf::SelectionManager::instance()->objectsByType(&collection); caf::SelectionManager::instance()->objectsByType(&collection);
CVF_ASSERT(collection.size() == 1); CVF_ASSERT(collection.size() == 1);
RimIntersectionCollection* intersectionCollection = NULL; RimIntersectionCollection* intersectionCollection = nullptr;
collection[0]->firstAncestorOrThisOfType(intersectionCollection); collection[0]->firstAncestorOrThisOfType(intersectionCollection);
CVF_ASSERT(intersectionCollection); CVF_ASSERT(intersectionCollection);
@ -71,7 +71,7 @@ void RicAppendIntersectionFeature::setupActionLook(QAction* actionToSetup)
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RicAppendIntersectionFeatureCmd::RicAppendIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection) RicAppendIntersectionFeatureCmd::RicAppendIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection)
: CmdExecuteCommand(NULL), : CmdExecuteCommand(nullptr),
m_intersectionCollection(intersectionCollection) m_intersectionCollection(intersectionCollection)
{ {
} }

View File

@ -81,7 +81,7 @@ void RicNewAzimuthDipIntersectionFeature::setupActionLook(QAction* actionToSetup
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RicNewAzimuthDipIntersectionFeatureCmd::RicNewAzimuthDipIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection) RicNewAzimuthDipIntersectionFeatureCmd::RicNewAzimuthDipIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection)
: CmdExecuteCommand(NULL), : CmdExecuteCommand(nullptr),
m_intersectionCollection(intersectionCollection) m_intersectionCollection(intersectionCollection)
{ {
} }

View File

@ -80,7 +80,7 @@ void RicNewPolylineIntersectionFeature::setupActionLook(QAction* actionToSetup)
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RicNewPolylineIntersectionFeatureCmd::RicNewPolylineIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection) RicNewPolylineIntersectionFeatureCmd::RicNewPolylineIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection)
: CmdExecuteCommand(NULL), : CmdExecuteCommand(nullptr),
m_intersectionCollection(intersectionCollection) m_intersectionCollection(intersectionCollection)
{ {
} }

View File

@ -52,7 +52,7 @@ void RicNewSimWellIntersectionFeature::onActionTriggered(bool isChecked)
RimSimWellInView* simWell = collection[0]; RimSimWellInView* simWell = collection[0];
RimEclipseView* eclView = NULL; RimEclipseView* eclView = nullptr;
simWell->firstAncestorOrThisOfType(eclView); simWell->firstAncestorOrThisOfType(eclView);
CVF_ASSERT(eclView); CVF_ASSERT(eclView);
@ -73,7 +73,7 @@ void RicNewSimWellIntersectionFeature::setupActionLook(QAction* actionToSetup)
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RicNewSimWellIntersectionCmd::RicNewSimWellIntersectionCmd(RimIntersectionCollection* intersectionCollection, RimSimWellInView* simWell) RicNewSimWellIntersectionCmd::RicNewSimWellIntersectionCmd(RimIntersectionCollection* intersectionCollection, RimSimWellInView* simWell)
: CmdExecuteCommand(NULL), : CmdExecuteCommand(nullptr),
m_intersectionCollection(intersectionCollection), m_intersectionCollection(intersectionCollection),
m_simWell(simWell) m_simWell(simWell)
{ {

View File

@ -82,7 +82,7 @@ void RicNewWellPathIntersectionFeature::setupActionLook(QAction* actionToSetup)
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RicNewWellPathIntersectionFeatureCmd::RicNewWellPathIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection, RimWellPath* wellPath) RicNewWellPathIntersectionFeatureCmd::RicNewWellPathIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection, RimWellPath* wellPath)
: CmdExecuteCommand(NULL), : CmdExecuteCommand(nullptr),
m_intersectionCollection(intersectionCollection), m_intersectionCollection(intersectionCollection),
m_wellPath(wellPath) m_wellPath(wellPath)
{ {

View File

@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT(RicAddEclipseInputPropertyFeature, "RicAddEclipseInputProper
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicAddEclipseInputPropertyFeature::isCommandEnabled() bool RicAddEclipseInputPropertyFeature::isCommandEnabled()
{ {
return selectedInputPropertyCollection() != NULL; return selectedInputPropertyCollection() != nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -43,10 +43,10 @@ bool RicComputeStatisticsFeature::isCommandEnabled()
RimEclipseStatisticsCase* statisticsCase = selection[0]; RimEclipseStatisticsCase* statisticsCase = selection[0];
if (statisticsCase) if (statisticsCase)
{ {
RimIdenticalGridCaseGroup* gridCaseGroup = NULL; RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
statisticsCase->firstAncestorOrThisOfType(gridCaseGroup); statisticsCase->firstAncestorOrThisOfType(gridCaseGroup);
RimCaseCollection* caseCollection = gridCaseGroup ? gridCaseGroup->caseCollection() : NULL; RimCaseCollection* caseCollection = gridCaseGroup ? gridCaseGroup->caseCollection() : nullptr;
return caseCollection ? caseCollection->reservoirs.size() > 0 : false; return caseCollection ? caseCollection->reservoirs.size() > 0 : false;
} }
} }

View File

@ -50,7 +50,7 @@ void RicCreateGridCaseGroupFromFilesFeature::onActionTriggered(bool isChecked)
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES"); QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES");
RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(NULL, "Create Grid Case Group from Files", defaultDir, m_pathFilter, m_fileNameFilter, QStringList(".EGRID")); RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(nullptr, "Create Grid Case Group from Files", defaultDir, m_pathFilter, m_fileNameFilter, QStringList(".EGRID"));
// Remember filters // Remember filters
m_pathFilter = result.pathFilter; m_pathFilter = result.pathFilter;

View File

@ -33,7 +33,7 @@
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RicEclipseCaseNewGroupExec::RicEclipseCaseNewGroupExec() RicEclipseCaseNewGroupExec::RicEclipseCaseNewGroupExec()
: CmdExecuteCommand(NULL) : CmdExecuteCommand(nullptr)
{ {
} }
@ -60,7 +60,7 @@ void RicEclipseCaseNewGroupExec::redo()
RimProject* proj = RiaApplication::instance()->project(); RimProject* proj = RiaApplication::instance()->project();
CVF_ASSERT(proj); CVF_ASSERT(proj);
RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels() : NULL; RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels() : nullptr;
if (analysisModels) if (analysisModels)
{ {

View File

@ -91,7 +91,7 @@ void RicEclipsePropertyFilterFeatureImpl::insertPropertyFilter(RimEclipsePropert
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicEclipsePropertyFilterFeatureImpl::isPropertyFilterCommandAvailable(caf::PdmObjectHandle* object) bool RicEclipsePropertyFilterFeatureImpl::isPropertyFilterCommandAvailable(caf::PdmObjectHandle* object)
{ {
Rim3dView* rimView = NULL; Rim3dView* rimView = nullptr;
object->firstAncestorOrThisOfType(rimView); object->firstAncestorOrThisOfType(rimView);
if (rimView) if (rimView)
{ {

View File

@ -31,7 +31,7 @@
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RicEclipsePropertyFilterInsertExec::RicEclipsePropertyFilterInsertExec(RimEclipsePropertyFilter* propertyFilter) RicEclipsePropertyFilterInsertExec::RicEclipsePropertyFilterInsertExec(RimEclipsePropertyFilter* propertyFilter)
: CmdExecuteCommand(NULL) : CmdExecuteCommand(nullptr)
{ {
CVF_ASSERT(propertyFilter); CVF_ASSERT(propertyFilter);
m_propertyFilter = propertyFilter; m_propertyFilter = propertyFilter;

View File

@ -30,7 +30,7 @@
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RicEclipsePropertyFilterNewExec::RicEclipsePropertyFilterNewExec(RimEclipsePropertyFilterCollection* propertyFilterCollection) RicEclipsePropertyFilterNewExec::RicEclipsePropertyFilterNewExec(RimEclipsePropertyFilterCollection* propertyFilterCollection)
: CmdExecuteCommand(NULL) : CmdExecuteCommand(nullptr)
{ {
assert(propertyFilterCollection); assert(propertyFilterCollection);
m_propertyFilterCollection = propertyFilterCollection; m_propertyFilterCollection = propertyFilterCollection;

View File

@ -52,7 +52,7 @@ void RicImportEclipseCasesFeature::onActionTriggered(bool isChecked)
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID"); QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(NULL, RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(nullptr,
"Import Eclipse Cases", "Import Eclipse Cases",
defaultDir, defaultDir,
m_pathFilter, m_pathFilter,

View File

@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT(RicNewStatisticsCaseFeature, "RicNewStatisticsCaseFeature");
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicNewStatisticsCaseFeature::isCommandEnabled() bool RicNewStatisticsCaseFeature::isCommandEnabled()
{ {
return selectedValidUIItem() != NULL; return selectedValidUIItem() != nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -90,7 +90,7 @@ caf::PdmUiItem* RicNewStatisticsCaseFeature::selectedValidUIItem()
} }
} }
return NULL; return nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -98,7 +98,7 @@ caf::PdmUiItem* RicNewStatisticsCaseFeature::selectedValidUIItem()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimEclipseStatisticsCase* RicNewStatisticsCaseFeature::addStatisticalCalculation(caf::PdmUiItem* uiItem) RimEclipseStatisticsCase* RicNewStatisticsCaseFeature::addStatisticalCalculation(caf::PdmUiItem* uiItem)
{ {
RimIdenticalGridCaseGroup* caseGroup = NULL; RimIdenticalGridCaseGroup* caseGroup = nullptr;
if (dynamic_cast<RimEclipseStatisticsCase*>(uiItem)) if (dynamic_cast<RimEclipseStatisticsCase*>(uiItem))
{ {
@ -122,6 +122,6 @@ RimEclipseStatisticsCase* RicNewStatisticsCaseFeature::addStatisticalCalculation
} }
else else
{ {
return NULL; return nullptr;
} }
} }

View File

@ -69,7 +69,7 @@ void RicExportFaultsFeature::onActionTriggered(bool isChecked)
QString projectFolder = app->currentProjectPath(); QString projectFolder = app->currentProjectPath();
QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("FAULTS", projectFolder); QString defaultDir = RiaApplication::instance()->lastUsedDialogDirectoryWithFallback("FAULTS", projectFolder);
QString selectedDir = QFileDialog::getExistingDirectory(NULL, tr("Select Directory"), defaultDir); QString selectedDir = QFileDialog::getExistingDirectory(nullptr, tr("Select Directory"), defaultDir);
if (selectedDir.isNull()) { if (selectedDir.isNull()) {
// Stop if folder selection was cancelled. // Stop if folder selection was cancelled.

View File

@ -79,7 +79,7 @@ void RicExportToLasFileFeature::onActionTriggered(bool isChecked)
featureUi.setRkbDiffs(wellNames, rkbDiffs); featureUi.setRkbDiffs(wellNames, rkbDiffs);
} }
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, "Export Curve Data to LAS file(s)", "", QDialogButtonBox::Ok | QDialogButtonBox::Cancel); caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, "Export Curve Data to LAS file(s)", "", QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
RicExportFeatureImpl::configureForExport(&propertyDialog); RicExportFeatureImpl::configureForExport(&propertyDialog);
propertyDialog.resize(QSize(400, 200)); propertyDialog.resize(QSize(400, 200));

View File

@ -46,7 +46,7 @@ CAF_CMD_SOURCE_INIT(RicSaveEclipseInputPropertyFeature, "RicSaveEclipseInputProp
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicSaveEclipseInputPropertyFeature::isCommandEnabled() bool RicSaveEclipseInputPropertyFeature::isCommandEnabled()
{ {
return selectedInputProperty() != NULL; return selectedInputProperty() != nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -78,7 +78,7 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered(bool isChecked)
exportSettings.eclipseKeyword = inputProperty->eclipseKeyword; exportSettings.eclipseKeyword = inputProperty->eclipseKeyword;
// Find input reservoir for this property // Find input reservoir for this property
RimEclipseInputCase* inputReservoir = NULL; RimEclipseInputCase* inputReservoir = nullptr;
{ {
RimEclipseInputPropertyCollection* inputPropertyCollection = dynamic_cast<RimEclipseInputPropertyCollection*>(inputProperty->parentField()->ownerObject()); RimEclipseInputPropertyCollection* inputPropertyCollection = dynamic_cast<RimEclipseInputPropertyCollection*>(inputProperty->parentField()->ownerObject());
if (!inputPropertyCollection) return; if (!inputPropertyCollection) return;

View File

@ -45,7 +45,7 @@
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RicSaveEclipseResultAsInputPropertyExec::RicSaveEclipseResultAsInputPropertyExec(RimEclipseCellColors* cellColors) RicSaveEclipseResultAsInputPropertyExec::RicSaveEclipseResultAsInputPropertyExec(RimEclipseCellColors* cellColors)
: CmdExecuteCommand(NULL) : CmdExecuteCommand(nullptr)
{ {
CVF_ASSERT(cellColors); CVF_ASSERT(cellColors);
m_cellColors = cellColors; m_cellColors = cellColors;

View File

@ -90,7 +90,7 @@ void RicSnapshotViewToFileFeature::saveToFile(const QImage& image, const QString
} }
QString defaultAbsFileName = caf::Utils::constructFullFileName(startPath, defaultFileBaseName, ".png"); QString defaultAbsFileName = caf::Utils::constructFullFileName(startPath, defaultFileBaseName, ".png");
QString fileName = QFileDialog::getSaveFileName(NULL, tr("Export to File"), defaultAbsFileName); QString fileName = QFileDialog::getSaveFileName(nullptr, tr("Export to File"), defaultAbsFileName);
if (fileName.isEmpty()) if (fileName.isEmpty())
{ {
return; return;

View File

@ -67,7 +67,7 @@ void RicIntersectionBoxAtPosFeature::onActionTriggered(bool isChecked)
coll->updateConnectedEditors(); coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox); RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
RimGridView* rimView = NULL; RimGridView* rimView = nullptr;
coll->firstAncestorOrThisOfType(rimView); coll->firstAncestorOrThisOfType(rimView);
if (rimView) if (rimView)
{ {

View File

@ -67,7 +67,7 @@ void RicIntersectionBoxXSliceFeature::onActionTriggered(bool isChecked)
coll->updateConnectedEditors(); coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox); RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
RimGridView* rimView = NULL; RimGridView* rimView = nullptr;
coll->firstAncestorOrThisOfType(rimView); coll->firstAncestorOrThisOfType(rimView);
if (rimView) if (rimView)
{ {

View File

@ -67,7 +67,7 @@ void RicIntersectionBoxYSliceFeature::onActionTriggered(bool isChecked)
coll->updateConnectedEditors(); coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox); RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
RimGridView* rimView = NULL; RimGridView* rimView = nullptr;
coll->firstAncestorOrThisOfType(rimView); coll->firstAncestorOrThisOfType(rimView);
if (rimView) if (rimView)
{ {

View File

@ -66,7 +66,7 @@ void RicIntersectionBoxZSliceFeature::onActionTriggered(bool isChecked)
coll->updateConnectedEditors(); coll->updateConnectedEditors();
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox); RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
RimGridView* rimView = NULL; RimGridView* rimView = nullptr;
coll->firstAncestorOrThisOfType(rimView); coll->firstAncestorOrThisOfType(rimView);
if (rimView) if (rimView)
{ {

View File

@ -86,7 +86,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked)
} }
bool ok; bool ok;
fullPathFilenameNewScript = QInputDialog::getText(NULL, fullPathFilenameNewScript = QInputDialog::getText(nullptr,
"Specify new script file", "Specify new script file",
"File name", "File name",
QLineEdit::Normal, QLineEdit::Normal,

View File

@ -126,7 +126,7 @@ void RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(caf::PdmObjectGroup& o
return; return;
} }
RimEclipseResultCase* mainResultCase = NULL; RimEclipseResultCase* mainResultCase = nullptr;
std::vector< std::vector<int> > mainCaseGridDimensions; std::vector< std::vector<int> > mainCaseGridDimensions;
// Read out main grid and main grid dimensions if present in case group // Read out main grid and main grid dimensions if present in case group
@ -184,8 +184,8 @@ void RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(caf::PdmObjectGroup& o
} }
} }
RimOilField* activeOilField = proj ? proj->activeOilField() : NULL; RimOilField* activeOilField = proj ? proj->activeOilField() : nullptr;
RimEclipseCaseCollection* analysisModels = (activeOilField) ? activeOilField->analysisModels() : NULL; RimEclipseCaseCollection* analysisModels = (activeOilField) ? activeOilField->analysisModels() : nullptr;
if (analysisModels) analysisModels->insertCaseInCaseGroup(gridCaseGroup, rimResultReservoir); if (analysisModels) analysisModels->insertCaseInCaseGroup(gridCaseGroup, rimResultReservoir);
caf::PdmDocument::updateUiIconStateRecursively(rimResultReservoir); caf::PdmDocument::updateUiIconStateRecursively(rimResultReservoir);

View File

@ -95,13 +95,13 @@ RimIdenticalGridCaseGroup* RicPasteFeatureImpl::findGridCaseGroup(caf::PdmObject
else if (dynamic_cast<RimCaseCollection*>(objectHandle) || else if (dynamic_cast<RimCaseCollection*>(objectHandle) ||
dynamic_cast<RimEclipseCase*>(objectHandle)) dynamic_cast<RimEclipseCase*>(objectHandle))
{ {
RimIdenticalGridCaseGroup* gridCaseGroup = NULL; RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
objectHandle->firstAncestorOrThisOfType(gridCaseGroup); objectHandle->firstAncestorOrThisOfType(gridCaseGroup);
return gridCaseGroup; return gridCaseGroup;
} }
return NULL; return nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -120,7 +120,7 @@ RimEclipseCase* RicPasteFeatureImpl::findEclipseCase(caf::PdmObjectHandle* objec
return reservoirView->eclipseCase(); return reservoirView->eclipseCase();
} }
return NULL; return nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -49,7 +49,7 @@ CAF_CMD_SOURCE_INIT(RicCloseCaseFeature, "RicCloseCaseFeature");
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicCloseCaseFeature::isCommandEnabled() bool RicCloseCaseFeature::isCommandEnabled()
{ {
return selectedEclipseCase() != NULL || selectedGeoMechCase() != NULL; return selectedEclipseCase() != nullptr || selectedGeoMechCase() != nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -102,7 +102,7 @@ RimEclipseCase* RicCloseCaseFeature::selectedEclipseCase() const
return selection[0]; return selection[0];
} }
return NULL; return nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -118,7 +118,7 @@ RimGeoMechCase* RicCloseCaseFeature::selectedGeoMechCase() const
return selection[0]; return selection[0];
} }
return NULL; return nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -129,8 +129,8 @@ void RicCloseCaseFeature::removeCaseFromAllGroups(RimEclipseCase* eclipseCase)
CVF_ASSERT(eclipseCase); CVF_ASSERT(eclipseCase);
RimProject* proj = RiaApplication::instance()->project(); RimProject* proj = RiaApplication::instance()->project();
RimOilField* activeOilField = proj ? proj->activeOilField() : NULL; RimOilField* activeOilField = proj ? proj->activeOilField() : nullptr;
RimEclipseCaseCollection* analysisModels = (activeOilField) ? activeOilField->analysisModels() : NULL; RimEclipseCaseCollection* analysisModels = (activeOilField) ? activeOilField->analysisModels() : nullptr;
if (analysisModels) if (analysisModels)
{ {
analysisModels->removeCaseFromAllGroups(eclipseCase); analysisModels->removeCaseFromAllGroups(eclipseCase);
@ -197,8 +197,8 @@ void RicCloseCaseFeature::deleteGeoMechCase(RimGeoMechCase* geoMechCase)
CVF_ASSERT(geoMechCase); CVF_ASSERT(geoMechCase);
RimProject* proj = RiaApplication::instance()->project(); RimProject* proj = RiaApplication::instance()->project();
RimOilField* activeOilField = proj ? proj->activeOilField() : NULL; RimOilField* activeOilField = proj ? proj->activeOilField() : nullptr;
RimGeoMechModels* models = (activeOilField) ? activeOilField->geoMechModels() : NULL; RimGeoMechModels* models = (activeOilField) ? activeOilField->geoMechModels() : nullptr;
if (models) if (models)
{ {
models->cases.removeChildObject(geoMechCase); models->cases.removeChildObject(geoMechCase);
@ -240,7 +240,7 @@ bool RicCloseCaseFeature::userConfirmedGridCaseGroupChange(const std::vector<Rim
for (size_t i = 0; i < casesToBeDeleted.size(); i++) for (size_t i = 0; i < casesToBeDeleted.size(); i++)
{ {
RimIdenticalGridCaseGroup* gridCaseGroup = NULL; RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
casesToBeDeleted[i]->firstAncestorOrThisOfType(gridCaseGroup); casesToBeDeleted[i]->firstAncestorOrThisOfType(gridCaseGroup);
if (gridCaseGroup && hasAnyStatisticsResults(gridCaseGroup)) if (gridCaseGroup && hasAnyStatisticsResults(gridCaseGroup))

View File

@ -97,7 +97,7 @@ void RicDeleteItemExec::redo()
caf::PdmObjectHandle* parentObj = listField->ownerObject(); caf::PdmObjectHandle* parentObj = listField->ownerObject();
parentObj->uiCapability()->updateConnectedEditors(); parentObj->uiCapability()->updateConnectedEditors();
Rim3dView* view = NULL; Rim3dView* view = nullptr;
parentObj->firstAncestorOrThisOfType(view); parentObj->firstAncestorOrThisOfType(view);
// Range Filters // Range Filters
@ -107,7 +107,7 @@ void RicDeleteItemExec::redo()
if (rangeFilterColl) if (rangeFilterColl)
{ {
rangeFilterColl->updateDisplayModeNotifyManagedViews(NULL); rangeFilterColl->updateDisplayModeNotifyManagedViews(nullptr);
} }
// Prop Filter // Prop Filter
@ -219,7 +219,7 @@ void RicDeleteItemExec::redo()
{ {
if (wellLogPlotCollection->wellLogPlots.empty()) if (wellLogPlotCollection->wellLogPlots.empty())
{ {
RimProject* project = NULL; RimProject* project = nullptr;
parentObj->firstAncestorOrThisOfType(project); parentObj->firstAncestorOrThisOfType(project);
if (project) if (project)
{ {
@ -230,13 +230,13 @@ void RicDeleteItemExec::redo()
// Linked views // Linked views
RimViewLinkerCollection* viewLinkerCollection = NULL; RimViewLinkerCollection* viewLinkerCollection = nullptr;
parentObj->firstAncestorOrThisOfType(viewLinkerCollection); parentObj->firstAncestorOrThisOfType(viewLinkerCollection);
if (viewLinkerCollection) if (viewLinkerCollection)
{ {
viewLinkerCollection->uiCapability()->updateConnectedEditors(); viewLinkerCollection->uiCapability()->updateConnectedEditors();
RimProject* project = NULL; RimProject* project = nullptr;
parentObj->firstAncestorOrThisOfType(project); parentObj->firstAncestorOrThisOfType(project);
if (project) if (project)
{ {

View File

@ -273,7 +273,7 @@ void RicFileHierarchyDialog::clearFileList()
void RicFileHierarchyDialog::updateStatus(Status status, bool force) void RicFileHierarchyDialog::updateStatus(Status status, bool force)
{ {
static time_t lastStatusUpdate = 0; static time_t lastStatusUpdate = 0;
time_t now = time(0); time_t now = time(nullptr);
// If less than one second since last update, then return // If less than one second since last update, then return
if (!force && now == lastStatusUpdate) return; if (!force && now == lastStatusUpdate) return;

View File

@ -46,7 +46,7 @@ public:
RicFileHierarchyDialog(QWidget* parent); RicFileHierarchyDialog(QWidget* parent);
~RicFileHierarchyDialog(); ~RicFileHierarchyDialog();
static RicFileHierarchyDialogResult getOpenFileNames(QWidget *parent = 0, static RicFileHierarchyDialogResult getOpenFileNames(QWidget *parent = nullptr,
const QString& caption = QString(), const QString& caption = QString(),
const QString& dir = QString(), const QString& dir = QString(),
const QString& pathFilter = QString(), const QString& pathFilter = QString(),

View File

@ -31,7 +31,7 @@
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RicGeoMechPropertyFilterInsertExec::RicGeoMechPropertyFilterInsertExec(RimGeoMechPropertyFilter* propertyFilter) RicGeoMechPropertyFilterInsertExec::RicGeoMechPropertyFilterInsertExec(RimGeoMechPropertyFilter* propertyFilter)
: CmdExecuteCommand(NULL) : CmdExecuteCommand(nullptr)
{ {
CVF_ASSERT(propertyFilter); CVF_ASSERT(propertyFilter);
m_propertyFilter = propertyFilter; m_propertyFilter = propertyFilter;

View File

@ -29,7 +29,7 @@
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RicGeoMechPropertyFilterNewExec::RicGeoMechPropertyFilterNewExec(RimGeoMechPropertyFilterCollection* propertyFilterCollection) RicGeoMechPropertyFilterNewExec::RicGeoMechPropertyFilterNewExec(RimGeoMechPropertyFilterCollection* propertyFilterCollection)
: CmdExecuteCommand(NULL) : CmdExecuteCommand(nullptr)
{ {
assert(propertyFilterCollection); assert(propertyFilterCollection);
m_propertyFilterCollection = propertyFilterCollection; m_propertyFilterCollection = propertyFilterCollection;

View File

@ -41,7 +41,7 @@ void RicImportGeoMechCaseFeature::onActionTriggered(bool isChecked)
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("GEOMECH_MODEL"); QString defaultDir = app->lastUsedDialogDirectory("GEOMECH_MODEL");
QStringList fileNames = QFileDialog::getOpenFileNames(NULL, "Import Geo-Mechanical Model", defaultDir, "Abaqus results (*.odb)"); QStringList fileNames = QFileDialog::getOpenFileNames(nullptr, "Import Geo-Mechanical Model", defaultDir, "Abaqus results (*.odb)");
if (fileNames.size()) defaultDir = QFileInfo(fileNames.last()).absolutePath(); if (fileNames.size()) defaultDir = QFileInfo(fileNames.last()).absolutePath();
app->setLastUsedDialogDirectory("GEOMECH_MODEL", defaultDir); app->setLastUsedDialogDirectory("GEOMECH_MODEL", defaultDir);

View File

@ -54,7 +54,7 @@ void RicImportSummaryCaseFeature::onActionTriggered(bool isChecked)
{ {
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES"); QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES");
QStringList fileNames = QFileDialog::getOpenFileNames(NULL, "Import Summary Case", defaultDir, "Eclipse Summary File (*.SMSPEC);;All Files (*.*)"); QStringList fileNames = QFileDialog::getOpenFileNames(nullptr, "Import Summary Case", defaultDir, "Eclipse Summary File (*.SMSPEC);;All Files (*.*)");
if (fileNames.isEmpty()) return; if (fileNames.isEmpty()) return;

View File

@ -57,7 +57,7 @@ void RicImportSummaryCasesFeature::onActionTriggered(bool isChecked)
RiaApplication* app = RiaApplication::instance(); RiaApplication* app = RiaApplication::instance();
QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES"); QString defaultDir = app->lastUsedDialogDirectory("INPUT_FILES");
RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(NULL, "Import Summary Cases", defaultDir, m_pathFilter, m_fileNameFilter, QStringList(".SMSPEC")); RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(nullptr, "Import Summary Cases", defaultDir, m_pathFilter, m_fileNameFilter, QStringList(".SMSPEC"));
// Remember filters // Remember filters
m_pathFilter = result.pathFilter; m_pathFilter = result.pathFilter;

View File

@ -52,10 +52,10 @@ void RicNewViewFeature::addReservoirView(RimEclipseCase* eclipseCase, RimGeoMech
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RicNewViewFeature::isCommandEnabled() bool RicNewViewFeature::isCommandEnabled()
{ {
return selectedEclipseCase() != NULL return selectedEclipseCase() != nullptr
|| selectedEclipseView() != NULL || selectedEclipseView() != nullptr
|| selectedGeoMechCase() != NULL || selectedGeoMechCase() != nullptr
|| selectedGeoMechView() != NULL; || selectedGeoMechView() != nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -91,7 +91,7 @@ void RicNewViewFeature::setupActionLook(QAction* actionToSetup)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
Rim3dView* RicNewViewFeature::createReservoirView(RimEclipseCase* eclipseCase, RimGeoMechCase* geomCase) Rim3dView* RicNewViewFeature::createReservoirView(RimEclipseCase* eclipseCase, RimGeoMechCase* geomCase)
{ {
Rim3dView* insertedView = NULL; Rim3dView* insertedView = nullptr;
if (eclipseCase) if (eclipseCase)
{ {
@ -131,7 +131,7 @@ RimEclipseCase* RicNewViewFeature::selectedEclipseCase()
return selection[0]; return selection[0];
} }
return NULL; return nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -147,7 +147,7 @@ RimGeoMechCase* RicNewViewFeature::selectedGeoMechCase()
return selection[0]; return selection[0];
} }
return NULL; return nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -163,7 +163,7 @@ RimEclipseView* RicNewViewFeature::selectedEclipseView()
return selection[0]; return selection[0];
} }
return NULL; return nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -179,5 +179,5 @@ RimGeoMechView* RicNewViewFeature::selectedGeoMechView()
return selection[0]; return selection[0];
} }
return NULL; return nullptr;
} }

View File

@ -28,7 +28,7 @@
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RicRangeFilterExecImpl::RicRangeFilterExecImpl(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter) RicRangeFilterExecImpl::RicRangeFilterExecImpl(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter)
: CmdExecuteCommand(NULL) : CmdExecuteCommand(nullptr)
{ {
CVF_ASSERT(rangeFilterCollection); CVF_ASSERT(rangeFilterCollection);
m_cellRangeFilterCollection = rangeFilterCollection; m_cellRangeFilterCollection = rangeFilterCollection;

View File

@ -31,7 +31,7 @@ class RimCellRangeFilterCollection;
class RicRangeFilterExecImpl : public caf::CmdExecuteCommand class RicRangeFilterExecImpl : public caf::CmdExecuteCommand
{ {
public: public:
RicRangeFilterExecImpl(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = 0); RicRangeFilterExecImpl(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = nullptr);
virtual ~RicRangeFilterExecImpl(); virtual ~RicRangeFilterExecImpl();
virtual QString name() = 0; virtual QString name() = 0;

View File

@ -65,7 +65,7 @@ void RicRangeFilterInsertExec::redo()
rangeFilter->setDefaultValues(); rangeFilter->setDefaultValues();
applyCommandDataOnFilter(rangeFilter); applyCommandDataOnFilter(rangeFilter);
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL); m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(nullptr);
m_cellRangeFilterCollection->updateConnectedEditors(); m_cellRangeFilterCollection->updateConnectedEditors();

View File

@ -30,7 +30,7 @@ class RimCellRangeFilterCollection;
class RicRangeFilterInsertExec : public RicRangeFilterExecImpl class RicRangeFilterInsertExec : public RicRangeFilterExecImpl
{ {
public: public:
RicRangeFilterInsertExec(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = 0); RicRangeFilterInsertExec(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = nullptr);
virtual ~RicRangeFilterInsertExec(); virtual ~RicRangeFilterInsertExec();
virtual QString name(); virtual QString name();

View File

@ -71,7 +71,7 @@ void RicRangeFilterNewExec::redo()
rangeFilter->setDefaultValues(); rangeFilter->setDefaultValues();
applyCommandDataOnFilter(rangeFilter); applyCommandDataOnFilter(rangeFilter);
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL); m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(nullptr);
m_cellRangeFilterCollection->updateConnectedEditors(); m_cellRangeFilterCollection->updateConnectedEditors();
@ -94,7 +94,7 @@ void RicRangeFilterNewExec::undo()
m_cellRangeFilterCollection->rangeFilters.erase(m_cellRangeFilterCollection->rangeFilters.size() - 1); m_cellRangeFilterCollection->rangeFilters.erase(m_cellRangeFilterCollection->rangeFilters.size() - 1);
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL); m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(nullptr);
m_cellRangeFilterCollection->updateConnectedEditors(); m_cellRangeFilterCollection->updateConnectedEditors();
} }

View File

@ -27,7 +27,7 @@
class RicRangeFilterNewExec : public RicRangeFilterExecImpl class RicRangeFilterNewExec : public RicRangeFilterExecImpl
{ {
public: public:
RicRangeFilterNewExec(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = 0); RicRangeFilterNewExec(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = nullptr);
virtual ~RicRangeFilterNewExec(); virtual ~RicRangeFilterNewExec();
virtual QString name(); virtual QString name();

View File

@ -47,7 +47,7 @@ RimEclipseView* RicSelectOrCreateViewFeatureImpl::showViewSelection(RimEclipseRe
featureUi.setCase(resultCase); featureUi.setCase(resultCase);
} }
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, dialogTitle, ""); caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, dialogTitle, "");
propertyDialog.resize(QSize(400, 200)); propertyDialog.resize(QSize(400, 200));
if (propertyDialog.exec() != QDialog::Accepted) return nullptr; if (propertyDialog.exec() != QDialog::Accepted) return nullptr;

View File

@ -112,7 +112,7 @@ RimSummaryPlot* RicNewGridTimeHistoryCurveFeature::userSelectedSummaryPlot()
QString newPlotName = RicNewGridTimeHistoryCurveFeature::suggestedNewPlotName(); QString newPlotName = RicNewGridTimeHistoryCurveFeature::suggestedNewPlotName();
featureUi.setSuggestedPlotName(newPlotName); featureUi.setSuggestedPlotName(newPlotName);
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, "Select Destination Plot", ""); caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, "Select Destination Plot", "");
propertyDialog.resize(QSize(400, 200)); propertyDialog.resize(QSize(400, 200));
if (propertyDialog.exec() != QDialog::Accepted) return nullptr; if (propertyDialog.exec() != QDialog::Accepted) return nullptr;

View File

@ -84,7 +84,7 @@ void RicPasteAsciiDataToSummaryPlotFeature::onActionTriggered(bool isChecked)
if (!summaryPlot) pasteOptions.createNewPlot(); if (!summaryPlot) pasteOptions.createNewPlot();
pasteOptions.setUiModePasteText(text); pasteOptions.setUiModePasteText(text);
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &pasteOptions, "Set Paste Options", ""); caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &pasteOptions, "Set Paste Options", "");
if (propertyDialog.exec() != QDialog::Accepted) return; if (propertyDialog.exec() != QDialog::Accepted) return;
std::vector<RimAsciiDataCurve*> curves = parseCurves(text, pasteOptions); std::vector<RimAsciiDataCurve*> curves = parseCurves(text, pasteOptions);

View File

@ -692,7 +692,7 @@ void RicSummaryCurveCreator::createNewPlot()
{ {
bool ok = false; bool ok = false;
candidatePlotName = QInputDialog::getText(NULL, candidatePlotName = QInputDialog::getText(nullptr,
"New Summary Plot Name", "New Summary Plot Name", "New Summary Plot Name", "New Summary Plot Name",
QLineEdit::Normal, QLineEdit::Normal,
candidatePlotName, candidatePlotName,

View File

@ -152,7 +152,7 @@ void RicLinkVisibleViewsFeature::linkViews(std::vector<RimGridView*>& views)
RicLinkVisibleViewsFeatureUi featureUi; RicLinkVisibleViewsFeatureUi featureUi;
featureUi.setViews(views); featureUi.setViews(views);
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, "Select Master View", ""); caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, "Select Master View", "");
propertyDialog.setWindowIcon(QIcon(":/chain.png")); propertyDialog.setWindowIcon(QIcon(":/chain.png"));
if (propertyDialog.exec() != QDialog::Accepted) return; if (propertyDialog.exec() != QDialog::Accepted) return;

View File

@ -49,7 +49,7 @@ void RicShowAllLinkedViewsFeature::onActionTriggered(bool isChecked)
caf::SelectionManager::instance()->objectsByType(&managedViews); caf::SelectionManager::instance()->objectsByType(&managedViews);
for (size_t i = 0; i < managedViews.size(); i++) for (size_t i = 0; i < managedViews.size(); i++)
{ {
RimViewLinker* rimLinked = NULL; RimViewLinker* rimLinked = nullptr;
managedViews[i]->firstAncestorOrThisOfType(rimLinked); managedViews[i]->firstAncestorOrThisOfType(rimLinked);
CVF_ASSERT(rimLinked); CVF_ASSERT(rimLinked);

View File

@ -75,10 +75,10 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked)
{ {
RimWellLogFileChannel* wellLog = selection[wlIdx]; RimWellLogFileChannel* wellLog = selection[wlIdx];
RimWellPath* wellPath = NULL; RimWellPath* wellPath = nullptr;
wellLog->firstAncestorOrThisOfType(wellPath); wellLog->firstAncestorOrThisOfType(wellPath);
RimWellLogFile* wellLogFile = NULL; RimWellLogFile* wellLogFile = nullptr;
wellLog->firstAncestorOrThisOfType(wellLogFile); wellLog->firstAncestorOrThisOfType(wellLogFile);
if (wellLogFile) if (wellLogFile)
{ {

View File

@ -43,7 +43,7 @@ bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled()
if (selection.size() > 0) if (selection.size() > 0)
{ {
RimWellLogPlot* wellLogPlot = NULL; RimWellLogPlot* wellLogPlot = nullptr;
selection[0]->firstAncestorOrThisOfType(wellLogPlot); selection[0]->firstAncestorOrThisOfType(wellLogPlot);
if (wellLogPlot && wellLogPlot->trackCount() > 1) if (wellLogPlot && wellLogPlot->trackCount() > 1)
{ {
@ -68,7 +68,7 @@ void RicDeleteWellLogPlotTrackFeature::onActionTriggered(bool isChecked)
{ {
RimWellLogTrack* track = selection[i]; RimWellLogTrack* track = selection[i];
RimWellLogPlot* wellLogPlot = NULL; RimWellLogPlot* wellLogPlot = nullptr;
track->firstAncestorOrThisOfType(wellLogPlot); track->firstAncestorOrThisOfType(wellLogPlot);
if (wellLogPlot && wellLogPlot->trackCount() > 1) if (wellLogPlot && wellLogPlot->trackCount() > 1)
{ {

View File

@ -44,7 +44,7 @@ bool RicNewWellLogPlotTrackFeature::isCommandEnabled()
return false; return false;
} }
return selectedWellLogPlot() != NULL; return selectedWellLogPlot() != nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -107,11 +107,11 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigEclipseC
ecl_kw_type* specGridKw = NULL; ecl_kw_type* specGridKw = nullptr;
ecl_kw_type* zCornKw = NULL; ecl_kw_type* zCornKw = nullptr;
ecl_kw_type* coordKw = NULL; ecl_kw_type* coordKw = nullptr;
ecl_kw_type* actNumKw = NULL; ecl_kw_type* actNumKw = nullptr;
ecl_kw_type* mapAxesKw = NULL; ecl_kw_type* mapAxesKw = nullptr;
// Try to read all the needed keywords. Early exit if some are not found // Try to read all the needed keywords. Early exit if some are not found
caf::ProgressInfo progress(8, "Read Grid from Eclipse Input file"); caf::ProgressInfo progress(8, "Read Grid from Eclipse Input file");
@ -121,22 +121,22 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigEclipseC
bool allKwReadOk = true; bool allKwReadOk = true;
fseek(gridFilePointer, specgridPos, SEEK_SET); fseek(gridFilePointer, specgridPos, SEEK_SET);
allKwReadOk = allKwReadOk && NULL != (specGridKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ecl_type_create_from_type(ECL_INT_TYPE))); allKwReadOk = allKwReadOk && nullptr != (specGridKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ecl_type_create_from_type(ECL_INT_TYPE)));
progress.setProgress(1); progress.setProgress(1);
fseek(gridFilePointer, zcornPos, SEEK_SET); fseek(gridFilePointer, zcornPos, SEEK_SET);
allKwReadOk = allKwReadOk && NULL != (zCornKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ecl_type_create_from_type(ECL_FLOAT_TYPE))); allKwReadOk = allKwReadOk && nullptr != (zCornKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ecl_type_create_from_type(ECL_FLOAT_TYPE)));
progress.setProgress(2); progress.setProgress(2);
fseek(gridFilePointer, coordPos, SEEK_SET); fseek(gridFilePointer, coordPos, SEEK_SET);
allKwReadOk = allKwReadOk && NULL != (coordKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ecl_type_create_from_type(ECL_FLOAT_TYPE))); allKwReadOk = allKwReadOk && nullptr != (coordKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ecl_type_create_from_type(ECL_FLOAT_TYPE)));
progress.setProgress(3); progress.setProgress(3);
// If ACTNUM is not defined, this pointer will be NULL, which is a valid condition // If ACTNUM is not defined, this pointer will be NULL, which is a valid condition
if (actnumPos >= 0) if (actnumPos >= 0)
{ {
fseek(gridFilePointer, actnumPos, SEEK_SET); fseek(gridFilePointer, actnumPos, SEEK_SET);
allKwReadOk = allKwReadOk && NULL != (actNumKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ecl_type_create_from_type(ECL_INT_TYPE))); allKwReadOk = allKwReadOk && nullptr != (actNumKw = ecl_kw_fscanf_alloc_current_grdecl__(gridFilePointer, false , ecl_type_create_from_type(ECL_INT_TYPE)));
progress.setProgress(4); progress.setProgress(4);
} }
@ -645,7 +645,7 @@ void RifEclipseInputFileTools::parseAndReadFaults(const QString& fileName, cvf::
while (filePos != -1) while (filePos != -1)
{ {
readFaults(data, filePos, faults, NULL); readFaults(data, filePos, faults, nullptr);
filePos = findKeyword(faultsKeyword, data, filePos); filePos = findKeyword(faultsKeyword, data, filePos);
} }
} }
@ -919,7 +919,7 @@ void RifEclipseInputFileTools::readFaults(QFile &data, qint64 filePos, cvf::Coll
// qDebug() << "Reading faults from\n " << data.fileName(); // qDebug() << "Reading faults from\n " << data.fileName();
RigFault* fault = NULL; RigFault* fault = nullptr;
do do
{ {

View File

@ -307,7 +307,7 @@ int RifEclipseRestartFilesetAccess::reportNumber(const ecl_file_type* ecl_file)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
int RifEclipseRestartFilesetAccess::readUnitsType() int RifEclipseRestartFilesetAccess::readUnitsType()
{ {
ecl_file_type* ecl_file = NULL; ecl_file_type* ecl_file = nullptr;
if (m_ecl_files.size() > 0) if (m_ecl_files.size() > 0)
{ {

View File

@ -36,7 +36,7 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RifEclipseSummaryTools::findSummaryHeaderFile(const QString& inputFile, QString* headerFile, bool* isFormatted) void RifEclipseSummaryTools::findSummaryHeaderFile(const QString& inputFile, QString* headerFile, bool* isFormatted)
{ {
findSummaryHeaderFileInfo(inputFile, headerFile, NULL, NULL, isFormatted); findSummaryHeaderFileInfo(inputFile, headerFile, nullptr, nullptr, isFormatted);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -49,9 +49,9 @@ void RifEclipseSummaryTools::findSummaryFiles(const QString& inputFile,
dataFiles->clear(); dataFiles->clear();
headerFile->clear(); headerFile->clear();
char* myPath = NULL; char* myPath = nullptr;
char* myBase = NULL; char* myBase = nullptr;
char* myExtention = NULL; char* myExtention = nullptr;
util_alloc_file_components(RiaStringEncodingTools::toNativeEncoded(inputFile).data(), &myPath, &myBase, &myExtention); util_alloc_file_components(RiaStringEncodingTools::toNativeEncoded(inputFile).data(), &myPath, &myBase, &myExtention);
@ -61,7 +61,7 @@ void RifEclipseSummaryTools::findSummaryFiles(const QString& inputFile,
if(path.isEmpty() || base.isEmpty()) return ; if(path.isEmpty() || base.isEmpty()) return ;
char* myHeaderFile = NULL; char* myHeaderFile = nullptr;
stringlist_type* summary_file_list = stringlist_alloc_new(); stringlist_type* summary_file_list = stringlist_alloc_new();
ecl_util_alloc_summary_files(RiaStringEncodingTools::toNativeEncoded(path).data(), RiaStringEncodingTools::toNativeEncoded(base).data(), extention.data(), &myHeaderFile, summary_file_list); ecl_util_alloc_summary_files(RiaStringEncodingTools::toNativeEncoded(path).data(), RiaStringEncodingTools::toNativeEncoded(base).data(), extention.data(), &myHeaderFile, summary_file_list);
@ -107,13 +107,13 @@ QStringList RifEclipseSummaryTools::findSummaryDataFiles(const QString& caseFile
QString path; QString path;
QString base; QString base;
findSummaryHeaderFileInfo(caseFile, NULL, &path, &base, NULL); findSummaryHeaderFileInfo(caseFile, nullptr, &path, &base, nullptr);
if (path.isEmpty() || base.isEmpty()) return fileNames; if (path.isEmpty() || base.isEmpty()) return fileNames;
char* header_file = NULL; char* header_file = nullptr;
stringlist_type* summary_file_list = stringlist_alloc_new(); stringlist_type* summary_file_list = stringlist_alloc_new();
ecl_util_alloc_summary_files(RiaStringEncodingTools::toNativeEncoded(path).data(), RiaStringEncodingTools::toNativeEncoded(base).data(), NULL, &header_file, summary_file_list); ecl_util_alloc_summary_files(RiaStringEncodingTools::toNativeEncoded(path).data(), RiaStringEncodingTools::toNativeEncoded(base).data(), nullptr, &header_file, summary_file_list);
if (stringlist_get_size( summary_file_list ) > 0) if (stringlist_get_size( summary_file_list ) > 0)
{ {
for (int i = 0; i < stringlist_get_size(summary_file_list); i++) for (int i = 0; i < stringlist_get_size(summary_file_list); i++)
@ -169,11 +169,11 @@ void RifEclipseSummaryTools::dumpMetaData(RifSummaryReaderInterface* readerEclip
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RifEclipseSummaryTools::findSummaryHeaderFileInfo(const QString& inputFile, QString* headerFile, QString* path, QString* base, bool* isFormatted) void RifEclipseSummaryTools::findSummaryHeaderFileInfo(const QString& inputFile, QString* headerFile, QString* path, QString* base, bool* isFormatted)
{ {
char* myPath = NULL; char* myPath = nullptr;
char* myBase = NULL; char* myBase = nullptr;
bool formattedFile = true; bool formattedFile = true;
util_alloc_file_components(RiaStringEncodingTools::toNativeEncoded(inputFile).data(), &myPath, &myBase, NULL); util_alloc_file_components(RiaStringEncodingTools::toNativeEncoded(inputFile).data(), &myPath, &myBase, nullptr);
char* myHeaderFile = ecl_util_alloc_exfilename(myPath, myBase, ECL_SUMMARY_HEADER_FILE, true, -1); char* myHeaderFile = ecl_util_alloc_exfilename(myPath, myBase, ECL_SUMMARY_HEADER_FILE, true, -1);
if (!myHeaderFile) if (!myHeaderFile)

View File

@ -44,7 +44,7 @@
RifEclipseUnifiedRestartFileAccess::RifEclipseUnifiedRestartFileAccess() RifEclipseUnifiedRestartFileAccess::RifEclipseUnifiedRestartFileAccess()
: RifEclipseRestartDataAccess() : RifEclipseRestartDataAccess()
{ {
m_ecl_file = NULL; m_ecl_file = nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -461,7 +461,7 @@ void RifHdf5Reader::getElementResultValues(H5::H5File file, std::string groupNam
hsize_t dims[2]; hsize_t dims[2];
H5::DataSpace dataspace = dataset.getSpace(); H5::DataSpace dataspace = dataset.getSpace();
dataspace.getSimpleExtentDims(dims, NULL); dataspace.getSimpleExtentDims(dims, nullptr);
(*resultValues).resize(dims[0]); (*resultValues).resize(dims[0]);
dataset.read(resultValues->data(), H5::PredType::NATIVE_DOUBLE); dataset.read(resultValues->data(), H5::PredType::NATIVE_DOUBLE);

View File

@ -174,7 +174,7 @@ bool transferGridCellData(RigMainGrid* mainGrid, RigActiveCellInfo* activeCellIn
// Sub grid in cell // Sub grid in cell
const ecl_grid_type* subGrid = ecl_grid_get_cell_lgr1(localEclGrid, gridLocalCellIndex); const ecl_grid_type* subGrid = ecl_grid_get_cell_lgr1(localEclGrid, gridLocalCellIndex);
if (subGrid != NULL) if (subGrid != nullptr)
{ {
int subGridId = ecl_grid_get_lgr_nr(subGrid); int subGridId = ecl_grid_get_lgr_nr(subGrid);
CVF_ASSERT(subGridId > 0); CVF_ASSERT(subGridId > 0);
@ -208,10 +208,10 @@ RifReaderEclipseOutput::RifReaderEclipseOutput()
m_fileName.clear(); m_fileName.clear();
m_filesWithSameBaseName.clear(); m_filesWithSameBaseName.clear();
m_eclipseCase = NULL; m_eclipseCase = nullptr;
m_ecl_init_file = NULL; m_ecl_init_file = nullptr;
m_dynamicResultsAccess = NULL; m_dynamicResultsAccess = nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -223,7 +223,7 @@ RifReaderEclipseOutput::~RifReaderEclipseOutput()
{ {
ecl_file_close(m_ecl_init_file); ecl_file_close(m_ecl_init_file);
} }
m_ecl_init_file = NULL; m_ecl_init_file = nullptr;
if (m_dynamicResultsAccess.notNull()) if (m_dynamicResultsAccess.notNull())
{ {
@ -1634,7 +1634,7 @@ void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid, boo
if (well_segment_get_outlet_id(segment) == -1) if (well_segment_get_outlet_id(segment) == -1)
{ {
segment = NULL; segment = nullptr;
} }
else else
{ {
@ -1696,11 +1696,11 @@ void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid, boo
accLengthFromLastConnection += well_segment_get_length(outletSegment); accLengthFromLastConnection += well_segment_get_length(outletSegment);
segmentIdBelow = well_segment_get_id(outletSegment); segmentIdBelow = well_segment_get_id(outletSegment);
const well_segment_type* aboveOutletSegment = NULL; const well_segment_type* aboveOutletSegment = nullptr;
if (well_segment_get_outlet_id(outletSegment) == -1) if (well_segment_get_outlet_id(outletSegment) == -1)
{ {
aboveOutletSegment = NULL; aboveOutletSegment = nullptr;
} }
else else
{ {
@ -1740,7 +1740,7 @@ void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid, boo
if (well_segment_get_outlet_id(aboveOutletSegment) == -1) if (well_segment_get_outlet_id(aboveOutletSegment) == -1)
{ {
aboveOutletSegment = NULL; aboveOutletSegment = nullptr;
} }
else else
{ {

View File

@ -53,7 +53,7 @@ void RifReaderEclipseRft::open()
m_ecl_rft_file = ecl_rft_file_alloc_case(RiaStringEncodingTools::toNativeEncoded(m_fileName).data()); m_ecl_rft_file = ecl_rft_file_alloc_case(RiaStringEncodingTools::toNativeEncoded(m_fileName).data());
if (m_ecl_rft_file == NULL) if (m_ecl_rft_file == nullptr)
{ {
RiaLogging::warning(QString("Libecl could not find/open file '%'").arg( m_fileName)); RiaLogging::warning(QString("Libecl could not find/open file '%'").arg( m_fileName));
return; return;

View File

@ -33,7 +33,7 @@
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RifReaderEclipseSummary::RifReaderEclipseSummary() RifReaderEclipseSummary::RifReaderEclipseSummary()
: m_ecl_sum(NULL), : m_ecl_sum(nullptr),
m_ecl_SmSpec(nullptr) m_ecl_SmSpec(nullptr)
{ {
@ -47,7 +47,7 @@ RifReaderEclipseSummary::~RifReaderEclipseSummary()
if (m_ecl_sum) if (m_ecl_sum)
{ {
ecl_sum_free(m_ecl_sum); ecl_sum_free(m_ecl_sum);
m_ecl_sum = NULL; m_ecl_sum = nullptr;
} }
} }

View File

@ -124,7 +124,7 @@ bool RifReaderMockModel::dynamicResult(const QString& result, RiaDefines::Porosi
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
/// ///
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RifReaderMockModel::RifReaderMockModel() : m_reservoir(NULL) RifReaderMockModel::RifReaderMockModel() : m_reservoir(nullptr)
{ {
/* /*
m_cellResults.push_back("Dummy results"); m_cellResults.push_back("Dummy results");

View File

@ -96,9 +96,9 @@ void RivFemElmVisibilityCalculator::computePropertyVisibility(cvf::UByteArray* c
const cvf::UByteArray* rangeFilterVisibility, const cvf::UByteArray* rangeFilterVisibility,
RimGeoMechPropertyFilterCollection* propFilterColl) RimGeoMechPropertyFilterCollection* propFilterColl)
{ {
CVF_ASSERT(cellVisibility != NULL); CVF_ASSERT(cellVisibility != nullptr);
CVF_ASSERT(rangeFilterVisibility != NULL); CVF_ASSERT(rangeFilterVisibility != nullptr);
CVF_ASSERT(propFilterColl != NULL); CVF_ASSERT(propFilterColl != nullptr);
CVF_ASSERT(grid->elementCount() > 0); CVF_ASSERT(grid->elementCount() > 0);
CVF_ASSERT(rangeFilterVisibility->size() == static_cast<size_t>(grid->elementCount())); CVF_ASSERT(rangeFilterVisibility->size() == static_cast<size_t>(grid->elementCount()));
@ -255,8 +255,8 @@ void RivFemElmVisibilityCalculator::computeOverriddenCellVisibility(cvf::UByteAr
const RigFemPart* femPart, const RigFemPart* femPart,
RimViewController* masterViewLink) RimViewController* masterViewLink)
{ {
CVF_ASSERT(elmVisibilities != NULL); CVF_ASSERT(elmVisibilities != nullptr);
CVF_ASSERT(femPart != NULL); CVF_ASSERT(femPart != nullptr);
RimGridView* masterView = masterViewLink->ownerViewLinker()->masterView(); RimGridView* masterView = masterViewLink->ownerViewLinker()->masterView();
cvf::ref<cvf::UByteArray> totCellVisibility = masterView->currentTotalCellVisibility(); cvf::ref<cvf::UByteArray> totCellVisibility = masterView->currentTotalCellVisibility();

View File

@ -69,7 +69,7 @@ ref<DrawableGeo> RivFemPartGeometryGenerator::generateSurface()
CVF_ASSERT(m_quadVertices.notNull()); CVF_ASSERT(m_quadVertices.notNull());
if (m_quadVertices->size() == 0) return NULL; if (m_quadVertices->size() == 0) return nullptr;
ref<DrawableGeo> geo = new DrawableGeo; ref<DrawableGeo> geo = new DrawableGeo;
geo->setFromQuadVertexArray(m_quadVertices.p()); geo->setFromQuadVertexArray(m_quadVertices.p());
@ -85,7 +85,7 @@ ref<DrawableGeo> RivFemPartGeometryGenerator::generateSurface()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
ref<DrawableGeo> RivFemPartGeometryGenerator::createMeshDrawable() ref<DrawableGeo> RivFemPartGeometryGenerator::createMeshDrawable()
{ {
if (!(m_quadVertices.notNull() && m_quadVertices->size() != 0)) return NULL; if (!(m_quadVertices.notNull() && m_quadVertices->size() != 0)) return nullptr;
ref<DrawableGeo> geo = new DrawableGeo; ref<DrawableGeo> geo = new DrawableGeo;
geo->setVertexArray(m_quadVertices.p()); geo->setVertexArray(m_quadVertices.p());
@ -105,7 +105,7 @@ ref<DrawableGeo> RivFemPartGeometryGenerator::createMeshDrawable()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
ref<DrawableGeo> RivFemPartGeometryGenerator::createOutlineMeshDrawable(double creaseAngle) ref<DrawableGeo> RivFemPartGeometryGenerator::createOutlineMeshDrawable(double creaseAngle)
{ {
if (!(m_quadVertices.notNull() && m_quadVertices->size() != 0)) return NULL; if (!(m_quadVertices.notNull() && m_quadVertices->size() != 0)) return nullptr;
cvf::OutlineEdgeExtractor ee(creaseAngle, *m_quadVertices); cvf::OutlineEdgeExtractor ee(creaseAngle, *m_quadVertices);
@ -115,7 +115,7 @@ ref<DrawableGeo> RivFemPartGeometryGenerator::createOutlineMeshDrawable(double c
ref<cvf::UIntArray> lineIndices = ee.lineIndices(); ref<cvf::UIntArray> lineIndices = ee.lineIndices();
if (lineIndices->size() == 0) if (lineIndices->size() == 0)
{ {
return NULL; return nullptr;
} }
ref<PrimitiveSetIndexedUInt> prim = new PrimitiveSetIndexedUInt(PT_LINES); ref<PrimitiveSetIndexedUInt> prim = new PrimitiveSetIndexedUInt(PT_LINES);
@ -333,7 +333,7 @@ cvf::ref<cvf::DrawableGeo> RivFemPartGeometryGenerator::createMeshDrawableFromSi
quadVertices->assign(vertices); quadVertices->assign(vertices);
} }
if (!(quadVertices.notNull() && quadVertices->size() != 0)) return NULL; if (!(quadVertices.notNull() && quadVertices->size() != 0)) return nullptr;
ref<DrawableGeo> geo = new DrawableGeo; ref<DrawableGeo> geo = new DrawableGeo;
geo->setVertexArray(quadVertices.p()); geo->setVertexArray(quadVertices.p());

View File

@ -104,7 +104,7 @@ void RivFemPartPartMgr::generatePartGeometry(RivFemPartGeometryGenerator& geoBui
bool useBufferObjects = true; bool useBufferObjects = true;
// Surface geometry // Surface geometry
{ {
m_surfaceFaces = NULL; // To possibly free memory before adding the new stuff m_surfaceFaces = nullptr; // To possibly free memory before adding the new stuff
cvf::ref<cvf::DrawableGeo> geo = geoBuilder.generateSurface(); cvf::ref<cvf::DrawableGeo> geo = geoBuilder.generateSurface();
if (geo.notNull()) if (geo.notNull())
@ -139,7 +139,7 @@ void RivFemPartPartMgr::generatePartGeometry(RivFemPartGeometryGenerator& geoBui
// Mesh geometry // Mesh geometry
{ {
m_surfaceGridLines = NULL; // To possibly free memory before adding the new stuff m_surfaceGridLines = nullptr; // To possibly free memory before adding the new stuff
cvf::ref<cvf::DrawableGeo> geoMesh = geoBuilder.createMeshDrawable(); cvf::ref<cvf::DrawableGeo> geoMesh = geoBuilder.createMeshDrawable();
if (geoMesh.notNull()) if (geoMesh.notNull())
@ -176,7 +176,7 @@ void RivFemPartPartMgr::generatePartGeometry(RivFemPartGeometryGenerator& geoBui
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivFemPartPartMgr::appendPartsToModel(cvf::ModelBasicList* model) void RivFemPartPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
{ {
CVF_ASSERT(model != NULL); CVF_ASSERT(model != nullptr);
if(m_surfaceFaces.notNull() ) model->addPart(m_surfaceFaces.p() ); if(m_surfaceFaces.notNull() ) model->addPart(m_surfaceFaces.p() );
if(m_surfaceGridLines.notNull()) model->addPart(m_surfaceGridLines.p()); if(m_surfaceGridLines.notNull()) model->addPart(m_surfaceGridLines.p());
@ -250,7 +250,7 @@ void RivFemPartPartMgr::updateCellResultColor(size_t timeStepIndex, RimGeoMechCe
const std::vector<float>& resultValues = caseData->femPartResults()->resultValues(resVarAddress, m_gridIdx, (int)timeStepIndex); const std::vector<float>& resultValues = caseData->femPartResults()->resultValues(resVarAddress, m_gridIdx, (int)timeStepIndex);
const std::vector<size_t>* vxToResultMapping = NULL; const std::vector<size_t>* vxToResultMapping = nullptr;
int vxCount = 0; int vxCount = 0;
if (resVarAddress.resultPosType == RIG_NODAL) if (resVarAddress.resultPosType == RIG_NODAL)
@ -313,7 +313,7 @@ void RivFemPartPartMgr::updateCellResultColor(size_t timeStepIndex, RimGeoMechCe
} }
} }
Rim3dView* view = NULL; Rim3dView* view = nullptr;
cellResultColors->firstAncestorOrThisOfType(view); cellResultColors->firstAncestorOrThisOfType(view);
CVF_ASSERT(view); CVF_ASSERT(view);

View File

@ -205,7 +205,7 @@ RivGeoMechPartMgr* RivGeoMechVizLogic::getUpdatedPartMgr(RivGeoMechPartMgrCache:
} }
else if (pMgrKey.geometryType() == PROPERTY_FILTERED) else if (pMgrKey.geometryType() == PROPERTY_FILTERED)
{ {
RivGeoMechPartMgr* rangefiltered = NULL; RivGeoMechPartMgr* rangefiltered = nullptr;
if (m_geomechView->rangeFilterCollection()->hasActiveFilters()) if (m_geomechView->rangeFilterCollection()->hasActiveFilters())
{ {
rangefiltered = getUpdatedPartMgr(RivGeoMechPartMgrCache::Key(RANGE_FILTERED, -1)); rangefiltered = getUpdatedPartMgr(RivGeoMechPartMgrCache::Key(RANGE_FILTERED, -1));

View File

@ -535,8 +535,8 @@ void RivGridBoxGenerator::createLegend(EdgeType edge, cvf::Collection<cvf::Part>
break; break;
} }
std::vector<double>* displayCoordsTickValues = NULL; std::vector<double>* displayCoordsTickValues = nullptr;
std::vector<double>* domainCoordsTickValues = NULL; std::vector<double>* domainCoordsTickValues = nullptr;
if (axis == X_AXIS) if (axis == X_AXIS)
{ {

View File

@ -67,9 +67,9 @@ bool RivEclipseIntersectionGrid::useCell(size_t cellIndex) const
{ {
const RigCell& cell = m_mainGrid->globalCellArray()[cellIndex]; const RigCell& cell = m_mainGrid->globalCellArray()[cellIndex];
if (m_showInactiveCells) if (m_showInactiveCells)
return !(cell.isInvalid() || (cell.subGrid() != NULL)); return !(cell.isInvalid() || (cell.subGrid() != nullptr));
else else
return m_activeCellInfo->isActive(cellIndex) && (cell.subGrid() == NULL); return m_activeCellInfo->isActive(cellIndex) && (cell.subGrid() == nullptr);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -43,7 +43,7 @@
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
CellEdgeEffectGenerator::CellEdgeEffectGenerator(const cvf::ScalarMapper* edgeScalarMapper) CellEdgeEffectGenerator::CellEdgeEffectGenerator(const cvf::ScalarMapper* edgeScalarMapper)
{ {
CVF_ASSERT(edgeScalarMapper != NULL); CVF_ASSERT(edgeScalarMapper != nullptr);
m_edgeScalarMapper = edgeScalarMapper; m_edgeScalarMapper = edgeScalarMapper;

View File

@ -56,7 +56,7 @@ void RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo(
float opacityLevel) float opacityLevel)
{ {
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData(); RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData();
CVF_ASSERT(eclipseCase != NULL); CVF_ASSERT(eclipseCase != nullptr);
// Create result access objects // Create result access objects
@ -90,7 +90,7 @@ void RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo(
double ignoredScalarValue = cellEdgeResultColors->ignoredScalarValue(); double ignoredScalarValue = cellEdgeResultColors->ignoredScalarValue();
const std::vector<cvf::ubyte>* isWellPipeVisible = NULL; const std::vector<cvf::ubyte>* isWellPipeVisible = nullptr;
cvf::cref<cvf::UIntArray> gridCellToWellindexMap; cvf::cref<cvf::UIntArray> gridCellToWellindexMap;
if (opacityLevel < 1.0f) if (opacityLevel < 1.0f)
@ -200,7 +200,7 @@ void RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(size_t tim
cvf::DrawableGeo* geo, size_t gridIndex, float opacityLevel) cvf::DrawableGeo* geo, size_t gridIndex, float opacityLevel)
{ {
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData(); RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData();
CVF_ASSERT(eclipseCase != NULL); CVF_ASSERT(eclipseCase != nullptr);
cvf::ref<RigResultAccessor> cellEdgeResultAccessor = createCellEdgeResultAccessor(cellResultColors, cellEdgeResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex)); cvf::ref<RigResultAccessor> cellEdgeResultAccessor = createCellEdgeResultAccessor(cellResultColors, cellEdgeResultColors, timeStepIndex, eclipseCase, eclipseCase->grid(gridIndex));
@ -339,7 +339,7 @@ cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellEdgeResultAccess
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellCenterResultAccessor(RimEclipseCellColors* cellResultColors, size_t timeStepIndex, RigEclipseCaseData* eclipseCase, const RigGridBase* grid) cvf::ref<RigResultAccessor> RivCellEdgeGeometryUtils::createCellCenterResultAccessor(RimEclipseCellColors* cellResultColors, size_t timeStepIndex, RigEclipseCaseData* eclipseCase, const RigGridBase* grid)
{ {
cvf::ref<RigResultAccessor> resultAccessor = NULL; cvf::ref<RigResultAccessor> resultAccessor = nullptr;
if (cellResultColors->hasResult()) if (cellResultColors->hasResult())
{ {

View File

@ -60,7 +60,7 @@ cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::generateSurface()
CVF_ASSERT(m_vertices.notNull()); CVF_ASSERT(m_vertices.notNull());
if (m_vertices->size() == 0) return NULL; if (m_vertices->size() == 0) return nullptr;
cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo; cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo;
geo->setFromQuadVertexArray(m_vertices.p()); geo->setFromQuadVertexArray(m_vertices.p());
@ -75,7 +75,7 @@ cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::generateSurface()
cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::createMeshDrawable() cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::createMeshDrawable()
{ {
if (!(m_vertices.notNull() && m_vertices->size() != 0)) return NULL; if (!(m_vertices.notNull() && m_vertices->size() != 0)) return nullptr;
cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo; cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo;
geo->setVertexArray(m_vertices.p()); geo->setVertexArray(m_vertices.p());
@ -93,7 +93,7 @@ cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::createMeshDrawable()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::createOutlineMeshDrawable(double creaseAngle) cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::createOutlineMeshDrawable(double creaseAngle)
{ {
if (!(m_vertices.notNull() && m_vertices->size() != 0)) return NULL; if (!(m_vertices.notNull() && m_vertices->size() != 0)) return nullptr;
cvf::OutlineEdgeExtractor ee(creaseAngle, *m_vertices); cvf::OutlineEdgeExtractor ee(creaseAngle, *m_vertices);
@ -103,7 +103,7 @@ cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::createOutlineMeshDrawable(
cvf::ref<cvf::UIntArray> lineIndices = ee.lineIndices(); cvf::ref<cvf::UIntArray> lineIndices = ee.lineIndices();
if (lineIndices->size() == 0) if (lineIndices->size() == 0)
{ {
return NULL; return nullptr;
} }
cvf::ref<cvf::PrimitiveSetIndexedUInt> prim = new cvf::PrimitiveSetIndexedUInt(cvf::PT_LINES); cvf::ref<cvf::PrimitiveSetIndexedUInt> prim = new cvf::PrimitiveSetIndexedUInt(cvf::PT_LINES);

View File

@ -374,7 +374,7 @@ void RivFaultPartMgr::updatePartEffect()
m_oppositeFaultFaces->setEffect(geometryOnlyEffect.p()); m_oppositeFaultFaces->setEffect(geometryOnlyEffect.p());
} }
updateNNCColors(0, NULL); updateNNCColors(0, nullptr);
// Update mesh colors as well, in case of change // Update mesh colors as well, in case of change
RiaPreferences* prefs = RiaApplication::instance()->preferences(); RiaPreferences* prefs = RiaApplication::instance()->preferences();
@ -417,8 +417,8 @@ void RivFaultPartMgr::updatePartEffect()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivFaultPartMgr::createLabelWithAnchorLine(const cvf::Part* part) void RivFaultPartMgr::createLabelWithAnchorLine(const cvf::Part* part)
{ {
m_faultLabelPart = NULL; m_faultLabelPart = nullptr;
m_faultLabelLinePart = NULL; m_faultLabelLinePart = nullptr;
if (!part) return; if (!part) return;

View File

@ -189,7 +189,7 @@ void RivGridPartMgr::generatePartGeometry(cvf::StructGridGeometryGenerator& geoB
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivGridPartMgr::appendPartsToModel(cvf::ModelBasicList* model) void RivGridPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
{ {
CVF_ASSERT(model != NULL); CVF_ASSERT(model != nullptr);
if(m_surfaceFaces.notNull() ) model->addPart(m_surfaceFaces.p() ); if(m_surfaceFaces.notNull() ) model->addPart(m_surfaceFaces.p() );
if(m_surfaceGridLines.notNull()) model->addPart(m_surfaceGridLines.p()); if(m_surfaceGridLines.notNull()) model->addPart(m_surfaceGridLines.p());

View File

@ -56,7 +56,7 @@ cvf::ref<cvf::DrawableGeo> RivNNCGeometryGenerator::generateSurface()
CVF_ASSERT(m_vertices.notNull()); CVF_ASSERT(m_vertices.notNull());
if (m_vertices->size() == 0) return NULL; if (m_vertices->size() == 0) return nullptr;
cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo; cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo;
geo->setFromTriangleVertexArray(m_vertices.p()); geo->setFromTriangleVertexArray(m_vertices.p());
@ -76,7 +76,7 @@ void RivNNCGeometryGenerator::computeArrays()
long long numConnections = static_cast<long long>(m_nncIndexes.isNull()? m_nncData->connections().size(): m_nncIndexes->size()); long long numConnections = static_cast<long long>(m_nncIndexes.isNull()? m_nncData->connections().size(): m_nncIndexes->size());
bool isVisibilityCalcActive = m_cellVisibility.notNull() && m_grid.notNull(); bool isVisibilityCalcActive = m_cellVisibility.notNull() && m_grid.notNull();
std::vector<RigCell>* allCells = NULL; std::vector<RigCell>* allCells = nullptr;
if (isVisibilityCalcActive) if (isVisibilityCalcActive)
{ {
allCells = &(m_grid->mainGrid()->globalCellArray()); allCells = &(m_grid->mainGrid()->globalCellArray());

View File

@ -108,7 +108,7 @@ cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::createPipeSurface()
{ {
if (m_radius == 0.0) if (m_radius == 0.0)
{ {
return NULL; return nullptr;
} }
updateFilteredPipeCenterCoords(); updateFilteredPipeCenterCoords();
@ -212,9 +212,9 @@ void RivPipeGeometryGenerator::computeCircle(double radius, size_t tesselationCo
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateLine(const cvf::Vec3dArray* coords) cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateLine(const cvf::Vec3dArray* coords)
{ {
CVF_ASSERT(coords != NULL); CVF_ASSERT(coords != nullptr);
if (coords->size() < 2 ) return NULL; if (coords->size() < 2 ) return nullptr;
size_t duplicateVertexCount = 2 * (coords->size() - 1); size_t duplicateVertexCount = 2 * (coords->size() - 1);
@ -259,9 +259,9 @@ cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateLine(const cvf::Vec
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateExtrudedCylinder(double radius, size_t crossSectionNodeCount, const cvf::Vec3dArray* cylinderCenterCoords) cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateExtrudedCylinder(double radius, size_t crossSectionNodeCount, const cvf::Vec3dArray* cylinderCenterCoords)
{ {
CVF_ASSERT(cylinderCenterCoords != NULL); CVF_ASSERT(cylinderCenterCoords != nullptr);
if (cylinderCenterCoords->size() < 2) return NULL; if (cylinderCenterCoords->size() < 2) return nullptr;
std::vector<cvf::Vec3f> crossSectionVertices; std::vector<cvf::Vec3f> crossSectionVertices;
std::vector<cvf::Vec3f> cylinderSegmentNormals; std::vector<cvf::Vec3f> cylinderSegmentNormals;
@ -300,7 +300,7 @@ cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateExtrudedCylinder(do
} }
} }
if (i >= cylinderCenterCoords->size()-1) return NULL; // The pipe coordinates is all the same point if (i >= cylinderCenterCoords->size()-1) return nullptr; // The pipe coordinates is all the same point
// Loop along the cylinder center coords and calculate the cross section vertexes in each center vertex // Loop along the cylinder center coords and calculate the cross section vertexes in each center vertex
@ -346,7 +346,7 @@ cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateExtrudedCylinder(do
size_t crossSectionCount = crossSectionVertices.size() / crossSectionNodeCount; size_t crossSectionCount = crossSectionVertices.size() / crossSectionNodeCount;
if (crossSectionCount < 2) return NULL; if (crossSectionCount < 2) return nullptr;
CVF_ASSERT(crossSectionVertices.size() - crossSectionNodeCount == cylinderSegmentNormals.size()); CVF_ASSERT(crossSectionVertices.size() - crossSectionNodeCount == cylinderSegmentNormals.size());

View File

@ -95,7 +95,7 @@ void RivReservoirFaultsPartMgr::setCellVisibility(cvf::UByteArray* cellVisibilit
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model) void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
{ {
CVF_ASSERT(model != NULL); CVF_ASSERT(model != nullptr);
RimFaultInViewCollection* faultCollection = m_reservoirView->faultCollection(); RimFaultInViewCollection* faultCollection = m_reservoirView->faultCollection();
if (!faultCollection) return; if (!faultCollection) return;
@ -243,7 +243,7 @@ void RivReservoirFaultsPartMgr::updateCellEdgeResultColor(size_t timeStepIndex,
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirFaultsPartMgr::appendLabelPartsToModel(cvf::ModelBasicList* model) void RivReservoirFaultsPartMgr::appendLabelPartsToModel(cvf::ModelBasicList* model)
{ {
CVF_ASSERT(model != NULL); CVF_ASSERT(model != nullptr);
if (!m_reservoirView) return; if (!m_reservoirView) return;
RimFaultInViewCollection* faultCollection = m_reservoirView->faultCollection(); RimFaultInViewCollection* faultCollection = m_reservoirView->faultCollection();

View File

@ -150,8 +150,8 @@ void RivReservoirViewPartMgr::scheduleGeometryRegen(RivCellSetEnum geometryType)
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::clearGeometryCache(RivCellSetEnum geomType) void RivReservoirViewPartMgr::clearGeometryCache(RivCellSetEnum geomType)
{ {
RigEclipseCaseData* eclipseCase = NULL; RigEclipseCaseData* eclipseCase = nullptr;
if (m_reservoirView != NULL && m_reservoirView->eclipseCase()) if (m_reservoirView != nullptr && m_reservoirView->eclipseCase())
{ {
eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData(); eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData();
} }
@ -564,10 +564,10 @@ void RivReservoirViewPartMgr::computeNativeVisibility(cvf::UByteArray* cellVisib
bool activeCellsIsVisible, bool activeCellsIsVisible,
bool mainGridIsVisible) bool mainGridIsVisible)
{ {
CVF_ASSERT(cellVisibility != NULL); CVF_ASSERT(cellVisibility != nullptr);
CVF_ASSERT(grid != NULL); CVF_ASSERT(grid != nullptr);
CVF_ASSERT(activeCellInfo != NULL); CVF_ASSERT(activeCellInfo != nullptr);
CVF_ASSERT(cellIsInWellStatuses != NULL); CVF_ASSERT(cellIsInWellStatuses != nullptr);
CVF_ASSERT(cellIsInWellStatuses->size() >= grid->cellCount()); CVF_ASSERT(cellIsInWellStatuses->size() >= grid->cellCount());
cellVisibility->resize(grid->cellCount()); cellVisibility->resize(grid->cellCount());
@ -614,8 +614,8 @@ void RivReservoirViewPartMgr::computeOverriddenCellVisibility(cvf::UByteArray* c
std::vector<std::vector<cvf::UByteArray*> > gridsWithCellSetVisibility = masterView->getAllGridsCurrentCellSetsCellVisibility(); std::vector<std::vector<cvf::UByteArray*> > gridsWithCellSetVisibility = masterView->getAllGridsCurrentCellSetsCellVisibility();
#endif #endif
CVF_ASSERT(cellVisibility != NULL); CVF_ASSERT(cellVisibility != nullptr);
CVF_ASSERT(grid != NULL); CVF_ASSERT(grid != nullptr);
size_t gridCellCount = grid->cellCount(); size_t gridCellCount = grid->cellCount();
cellVisibility->resize(gridCellCount); cellVisibility->resize(gridCellCount);
@ -660,8 +660,8 @@ void RivReservoirViewPartMgr::computeOverriddenCellVisibility(cvf::UByteArray* c
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivReservoirViewPartMgr::copyByteArray(cvf::UByteArray* destination, const cvf::UByteArray* source ) void RivReservoirViewPartMgr::copyByteArray(cvf::UByteArray* destination, const cvf::UByteArray* source )
{ {
CVF_ASSERT(destination != NULL); CVF_ASSERT(destination != nullptr);
CVF_ASSERT(source != NULL); CVF_ASSERT(source != nullptr);
if (destination->size() != source->size()) if (destination->size() != source->size())
{ {
@ -685,11 +685,11 @@ void RivReservoirViewPartMgr::computeRangeVisibility(RivCellSetEnum geometryType
const cvf::UByteArray* nativeVisibility, const cvf::UByteArray* nativeVisibility,
const RimCellRangeFilterCollection* rangeFilterColl) const RimCellRangeFilterCollection* rangeFilterColl)
{ {
CVF_ASSERT(cellVisibility != NULL); CVF_ASSERT(cellVisibility != nullptr);
CVF_ASSERT(nativeVisibility != NULL); CVF_ASSERT(nativeVisibility != nullptr);
CVF_ASSERT(rangeFilterColl != NULL); CVF_ASSERT(rangeFilterColl != nullptr);
CVF_ASSERT(grid != NULL); CVF_ASSERT(grid != nullptr);
CVF_ASSERT(nativeVisibility->size() == grid->cellCount()); CVF_ASSERT(nativeVisibility->size() == grid->cellCount());
// Initialize range filter with native visibility // Initialize range filter with native visibility
@ -701,7 +701,7 @@ void RivReservoirViewPartMgr::computeRangeVisibility(RivCellSetEnum geometryType
cvf::CellRangeFilter gridCellRangeFilter; cvf::CellRangeFilter gridCellRangeFilter;
rangeFilterColl->compoundCellRangeFilter(&gridCellRangeFilter, grid->gridIndex()); rangeFilterColl->compoundCellRangeFilter(&gridCellRangeFilter, grid->gridIndex());
const RigLocalGrid* lgr = NULL; const RigLocalGrid* lgr = nullptr;
cvf::ref<cvf::UByteArray> parentGridVisibilities; cvf::ref<cvf::UByteArray> parentGridVisibilities;
if (!grid->isMainGrid()) if (!grid->isMainGrid())
@ -741,7 +741,7 @@ void RivReservoirViewPartMgr::computeRangeVisibility(RivCellSetEnum geometryType
size_t mainGridJ; size_t mainGridJ;
size_t mainGridK; size_t mainGridK;
bool isInSubGridArea = cell.subGrid() != NULL; bool isInSubGridArea = cell.subGrid() != nullptr;
grid->ijkFromCellIndex(cellIndex, &mainGridI, &mainGridJ, &mainGridK); grid->ijkFromCellIndex(cellIndex, &mainGridI, &mainGridJ, &mainGridK);
bool nativeRangeVisibility = false; bool nativeRangeVisibility = false;
@ -769,9 +769,9 @@ void RivReservoirViewPartMgr::computeRangeVisibility(RivCellSetEnum geometryType
void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVisibility, const RigGridBase* grid, size_t timeStepIndex, void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVisibility, const RigGridBase* grid, size_t timeStepIndex,
const cvf::UByteArray* rangeFilterVisibility, RimEclipsePropertyFilterCollection* propFilterColl) const cvf::UByteArray* rangeFilterVisibility, RimEclipsePropertyFilterCollection* propFilterColl)
{ {
CVF_ASSERT(cellVisibility != NULL); CVF_ASSERT(cellVisibility != nullptr);
CVF_ASSERT(rangeFilterVisibility != NULL); CVF_ASSERT(rangeFilterVisibility != nullptr);
CVF_ASSERT(propFilterColl != NULL); CVF_ASSERT(propFilterColl != nullptr);
CVF_ASSERT(grid->cellCount() > 0); CVF_ASSERT(grid->cellCount() > 0);
CVF_ASSERT(rangeFilterVisibility->size() == grid->cellCount()); CVF_ASSERT(rangeFilterVisibility->size() == grid->cellCount());

View File

@ -224,10 +224,10 @@ void RivSimWellPipesPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLi
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RivSimWellPipesPartMgr::updatePipeResultColor(size_t frameIndex) void RivSimWellPipesPartMgr::updatePipeResultColor(size_t frameIndex)
{ {
if (m_rimWell == NULL) return; if (m_rimWell == nullptr) return;
RigSimWellData* simWellData = m_rimWell->simWellData(); RigSimWellData* simWellData = m_rimWell->simWellData();
if (simWellData == NULL) return; if (simWellData == nullptr) return;
if (!simWellData->hasWellResult(frameIndex)) return; // Or reset colors or something if (!simWellData->hasWellResult(frameIndex)) return; // Or reset colors or something
@ -282,14 +282,14 @@ void RivSimWellPipesPartMgr::updatePipeResultColor(size_t frameIndex)
for (size_t wcIdx = 0; wcIdx < cellIds.size(); ++wcIdx) for (size_t wcIdx = 0; wcIdx < cellIds.size(); ++wcIdx)
{ {
// we need a faster lookup, I guess // we need a faster lookup, I guess
const RigWellResultPoint* wResCell = NULL; const RigWellResultPoint* wResCell = nullptr;
if (cellIds[wcIdx].isCell()) if (cellIds[wcIdx].isCell())
{ {
wResCell = wResFrame.findResultCell(cellIds[wcIdx].m_gridIndex, cellIds[wcIdx].m_gridCellIndex); wResCell = wResFrame.findResultCell(cellIds[wcIdx].m_gridIndex, cellIds[wcIdx].m_gridCellIndex);
} }
if (wResCell == NULL) if (wResCell == nullptr)
{ {
// We cant find any state. This well cell is closed. // We cant find any state. This well cell is closed.
} }

View File

@ -42,7 +42,7 @@ RivSingleCellPartGenerator::RivSingleCellPartGenerator(RigEclipseCaseData* rigCa
: m_rigCaseData(rigCaseData), : m_rigCaseData(rigCaseData),
m_gridIndex(gridIndex), m_gridIndex(gridIndex),
m_cellIndex(cellIndex), m_cellIndex(cellIndex),
m_geoMechCase(NULL) m_geoMechCase(nullptr)
{ {
} }
@ -53,7 +53,7 @@ RivSingleCellPartGenerator::RivSingleCellPartGenerator(RimGeoMechCase* rimGeoMec
: m_geoMechCase(rimGeoMechCase), : m_geoMechCase(rimGeoMechCase),
m_gridIndex(gridIndex), m_gridIndex(gridIndex),
m_cellIndex(cellIndex), m_cellIndex(cellIndex),
m_rigCaseData(NULL) m_rigCaseData(nullptr)
{ {
} }
@ -101,5 +101,5 @@ cvf::ref<cvf::DrawableGeo> RivSingleCellPartGenerator::createMeshDrawable()
return RivFemPartGeometryGenerator::createMeshDrawableFromSingleElement(femPart, m_cellIndex); return RivFemPartGeometryGenerator::createMeshDrawableFromSingleElement(femPart, m_cellIndex);
} }
return NULL; return nullptr;
} }

View File

@ -241,9 +241,9 @@ caf::EffectGenerator* RivTernaryScalarMapperEffectGenerator::copy() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
bool RivTernaryScalarMapperEffectGenerator::isImagesEqual(const cvf::TextureImage* texImg1, const cvf::TextureImage* texImg2) bool RivTernaryScalarMapperEffectGenerator::isImagesEqual(const cvf::TextureImage* texImg1, const cvf::TextureImage* texImg2)
{ {
if (texImg1 == NULL && texImg2 == NULL) return true; if (texImg1 == nullptr && texImg2 == nullptr) return true;
if (texImg1 != NULL && texImg2 != NULL if (texImg1 != nullptr && texImg2 != nullptr
&& texImg1->height() == texImg2->height() && texImg1->height() == texImg2->height()
&& texImg1->width() == texImg2->width() && texImg1->width() == texImg2->width()
&& texImg1->width() > 0 && texImg1->height() > 0 && texImg1->width() > 0 && texImg1->height() > 0

View File

@ -81,7 +81,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
RimEclipseCellColors* cellResultColors, RimEclipseCellColors* cellResultColors,
const RivTernaryScalarMapper* ternaryColorMapper, const RivTernaryScalarMapper* ternaryColorMapper,
size_t timeStepIndex) size_t timeStepIndex)
: m_quadMapper(NULL) : m_quadMapper(nullptr)
{ {
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData(); RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData();
@ -100,7 +100,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
m_resultAccessor->setTernaryResultAccessors(soil.p(), sgas.p(), swat.p()); m_resultAccessor->setTernaryResultAccessors(soil.p(), sgas.p(), swat.p());
// Create a texture mapper without detecting transparency using RigPipeInCellEvaluator // Create a texture mapper without detecting transparency using RigPipeInCellEvaluator
m_texMapper = new RivTernaryResultToTextureMapper(ternaryColorMapper, NULL); m_texMapper = new RivTernaryResultToTextureMapper(ternaryColorMapper, nullptr);
CVF_ASSERT(m_texMapper.notNull()); CVF_ASSERT(m_texMapper.notNull());
} }

View File

@ -137,7 +137,7 @@ void RimFishboneWellPathCollection::appendCompletion(RimFishboneWellPath* comple
uiCapability()->setUiHidden(!m_wellPaths.empty()); uiCapability()->setUiHidden(!m_wellPaths.empty());
RimProject* project = NULL; RimProject* project = nullptr;
firstAncestorOrThisOfTypeAsserted(project); firstAncestorOrThisOfTypeAsserted(project);
if (project) if (project)
{ {

View File

@ -494,7 +494,7 @@ QString Rim3dOverlayInfoConfig::caseInfoText(RimGeoMechView* geoMechView)
{ {
RimGeoMechCase* geoMechCase = geoMechView->geoMechCase(); RimGeoMechCase* geoMechCase = geoMechView->geoMechCase();
RigGeoMechCaseData* caseData = geoMechCase ? geoMechCase->geoMechData() : nullptr; RigGeoMechCaseData* caseData = geoMechCase ? geoMechCase->geoMechData() : nullptr;
RigFemPartCollection* femParts = caseData ? caseData->femParts() : NULL; RigFemPartCollection* femParts = caseData ? caseData->femParts() : nullptr;
if (femParts) if (femParts)
{ {

View File

@ -159,7 +159,7 @@ QWidget* Rim3dView::createViewWidget(QWidget* mainWindowParent)
QGLFormat glFormat; QGLFormat glFormat;
glFormat.setDirectRendering(RiaApplication::instance()->useShaders()); glFormat.setDirectRendering(RiaApplication::instance()->useShaders());
m_viewer = new RiuViewer(glFormat, NULL); m_viewer = new RiuViewer(glFormat, nullptr);
m_viewer->setOwnerReservoirView(this); m_viewer->setOwnerReservoirView(this);
cvf::String xLabel; cvf::String xLabel;

View File

@ -66,5 +66,5 @@ RimEclipseCase* RimCaseCollection::findByDescription(const QString& caseDescript
} }
} }
return NULL; return nullptr;
} }

View File

@ -102,7 +102,7 @@ void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* c
updateIconState(); updateIconState();
uiCapability()->updateConnectedEditors(); uiCapability()->updateConnectedEditors();
updateDisplayModeNotifyManagedViews(NULL); updateDisplayModeNotifyManagedViews(nullptr);
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -110,7 +110,7 @@ void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* c
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimCellRangeFilterCollection::updateDisplayModeNotifyManagedViews(RimCellRangeFilter* changedRangeFilter) void RimCellRangeFilterCollection::updateDisplayModeNotifyManagedViews(RimCellRangeFilter* changedRangeFilter)
{ {
Rim3dView* view = NULL; Rim3dView* view = nullptr;
firstAncestorOrThisOfType(view); firstAncestorOrThisOfType(view);
if (!view) return; if (!view) return;
@ -175,7 +175,7 @@ bool RimCellRangeFilterCollection::hasActiveIncludeFilters() const
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
Rim3dView* RimCellRangeFilterCollection::baseView() const Rim3dView* RimCellRangeFilterCollection::baseView() const
{ {
Rim3dView* rimView = NULL; Rim3dView* rimView = nullptr;
firstAncestorOrThisOfType(rimView); firstAncestorOrThisOfType(rimView);
return rimView; return rimView;

View File

@ -308,7 +308,7 @@ caf::PdmObjectHandle* RimCommandIssueFieldChanged::findObjectByName(caf::PdmObje
} }
} }
return NULL; return nullptr;
} }
@ -328,7 +328,7 @@ caf::PdmFieldHandle* RimCommandIssueFieldChanged::findFieldByKeyword(caf::PdmObj
} }
} }
return NULL; return nullptr;
} }

View File

@ -109,7 +109,7 @@ RimEclipseCase::RimEclipseCase()
m_fractureModelResults.uiCapability()->setUiHidden(true); m_fractureModelResults.uiCapability()->setUiHidden(true);
m_fractureModelResults.uiCapability()->setUiTreeChildrenHidden(true); m_fractureModelResults.uiCapability()->setUiTreeChildrenHidden(true);
this->setReservoirData( NULL ); this->setReservoirData( nullptr );
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
@ -483,8 +483,8 @@ void RimEclipseCase::setReservoirData(RigEclipseCaseData* eclipseCase)
} }
else else
{ {
m_fractureModelResults()->setCellResults(NULL); m_fractureModelResults()->setCellResults(nullptr);
m_matrixModelResults()->setCellResults(NULL); m_matrixModelResults()->setCellResults(nullptr);
} }
} }

View File

@ -70,7 +70,7 @@ RimEclipseCellColors::RimEclipseCellColors()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimEclipseCellColors::~RimEclipseCellColors() RimEclipseCellColors::~RimEclipseCellColors()
{ {
CVF_ASSERT(obsoleteField_legendConfig() == NULL); CVF_ASSERT(obsoleteField_legendConfig() == nullptr);
m_legendConfigData.deleteAllChildObjects(); m_legendConfigData.deleteAllChildObjects();
@ -171,7 +171,7 @@ void RimEclipseCellColors::initAfterRead()
RimLegendConfig* obsoleteLegend = obsoleteField_legendConfig(); RimLegendConfig* obsoleteLegend = obsoleteField_legendConfig();
// set to NULL before pushing into container // set to NULL before pushing into container
obsoleteField_legendConfig = NULL; obsoleteField_legendConfig = nullptr;
m_legendConfigData.push_back(obsoleteLegend); m_legendConfigData.push_back(obsoleteLegend);
m_legendConfigPtrField = obsoleteLegend; m_legendConfigPtrField = obsoleteLegend;

View File

@ -56,7 +56,7 @@ RimEclipseFaultColors::RimEclipseFaultColors()
RimEclipseFaultColors::~RimEclipseFaultColors() RimEclipseFaultColors::~RimEclipseFaultColors()
{ {
delete m_customFaultResultColors; delete m_customFaultResultColors;
m_customFaultResultColors = NULL; m_customFaultResultColors = nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

View File

@ -103,7 +103,7 @@ bool RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
return true; return true;
} }
if (this->eclipseCaseData() == NULL) if (this->eclipseCaseData() == nullptr)
{ {
this->setReservoirData(new RigEclipseCaseData(this)); this->setReservoirData(new RigEclipseCaseData(this));
} }
@ -181,7 +181,7 @@ bool RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
bool RimEclipseInputCase::openEclipseGridFile() bool RimEclipseInputCase::openEclipseGridFile()
{ {
// Early exit if reservoir data is created // Early exit if reservoir data is created
if (this->eclipseCaseData() == NULL) if (this->eclipseCaseData() == nullptr)
{ {
cvf::ref<RifReaderInterface> readerInterface; cvf::ref<RifReaderInterface> readerInterface;

View File

@ -76,6 +76,6 @@ RimEclipseInputProperty * RimEclipseInputPropertyCollection::findInputProperty(Q
} }
} }
return NULL; return nullptr;
} }

View File

@ -56,7 +56,7 @@ RimEclipsePropertyFilterCollection::~RimEclipsePropertyFilterCollection()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
RimEclipseView* RimEclipsePropertyFilterCollection::reservoirView() RimEclipseView* RimEclipsePropertyFilterCollection::reservoirView()
{ {
RimEclipseView* eclipseView = NULL; RimEclipseView* eclipseView = nullptr;
firstAncestorOrThisOfType(eclipseView); firstAncestorOrThisOfType(eclipseView);
return eclipseView; return eclipseView;
@ -143,7 +143,7 @@ void RimEclipsePropertyFilterCollection::updateIconState()
{ {
bool activeIcon = true; bool activeIcon = true;
RimEclipseView* view = NULL; RimEclipseView* view = nullptr;
this->firstAncestorOrThisOfType(view); this->firstAncestorOrThisOfType(view);
if (view) if (view)
{ {

View File

@ -152,7 +152,7 @@ bool RimEclipseResultCase::importGridAndResultMetaData(bool showTimeStepFilter)
m_timeStepFilter->setTimeStepsFromFile(timeSteps); m_timeStepFilter->setTimeStepsFromFile(timeSteps);
caf::PdmUiPropertyViewDialog propertyDialog(NULL, m_timeStepFilter, "Time Step Filter", "", QDialogButtonBox::Ok | QDialogButtonBox::Cancel); caf::PdmUiPropertyViewDialog propertyDialog(nullptr, m_timeStepFilter, "Time Step Filter", "", QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
propertyDialog.resize(QSize(400, 400)); propertyDialog.resize(QSize(400, 400));
if (propertyDialog.exec() != QDialog::Accepted) if (propertyDialog.exec() != QDialog::Accepted)
@ -387,7 +387,7 @@ cvf::ref<RifReaderInterface> RimEclipseResultCase::createMockModel(QString model
RimMockModelSettings rimMockModelSettings; RimMockModelSettings rimMockModelSettings;
caf::PdmSettings::readFieldsFromApplicationStore(&rimMockModelSettings); caf::PdmSettings::readFieldsFromApplicationStore(&rimMockModelSettings);
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &rimMockModelSettings, "Customize Mock Model", ""); caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &rimMockModelSettings, "Customize Mock Model", "");
if (propertyDialog.exec() == QDialog::Accepted) if (propertyDialog.exec() == QDialog::Accepted)
{ {
QApplication::restoreOverrideCursor(); QApplication::restoreOverrideCursor();

View File

@ -201,7 +201,7 @@ void RimEclipseStatisticsCase::populateResultSelectionAfterLoadingGrid()
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
void RimEclipseStatisticsCase::computeStatistics() void RimEclipseStatisticsCase::computeStatistics()
{ {
if (this->eclipseCaseData() == NULL) if (this->eclipseCaseData() == nullptr)
{ {
openEclipseGridFile(); openEclipseGridFile();
} }
@ -336,7 +336,7 @@ RimIdenticalGridCaseGroup* RimEclipseStatisticsCase::caseGroup()
return parentCollection->parentCaseGroup(); return parentCollection->parentCaseGroup();
} }
return NULL; return nullptr;
} }
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------

Some files were not shown because too many files have changed in this diff Show More