mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-05 21:53:27 -06:00
(clang-tidy) : modernize-use-nullptr
This commit is contained in:
parent
69875eec8f
commit
1ae30ef11a
@ -216,7 +216,7 @@ RiaApplication::RiaApplication(int& argc, char** argv)
|
||||
setWindowIcon(QIcon(":/AppLogo48x48.png"));
|
||||
|
||||
m_socketServer = new RiaSocketServer( this);
|
||||
m_workerProcess = NULL;
|
||||
m_workerProcess = nullptr;
|
||||
|
||||
#ifdef WIN32
|
||||
m_startupDefaultDirectory = QDir::homePath();
|
||||
@ -393,10 +393,10 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
|
||||
closeProject();
|
||||
|
||||
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();
|
||||
mainWnd->setPdmRoot(NULL);
|
||||
mainWnd->setPdmRoot(nullptr);
|
||||
|
||||
// Delete all object possibly generated by readFile()
|
||||
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++)
|
||||
{
|
||||
RimOilField* oilField = m_project->oilFields[oilFieldIdx];
|
||||
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : NULL;
|
||||
if (analysisModels == NULL) continue;
|
||||
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : nullptr;
|
||||
if (analysisModels == nullptr) continue;
|
||||
|
||||
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)
|
||||
{
|
||||
if (oilField == NULL) continue;
|
||||
if(oilField->formationNamesCollection() != NULL)
|
||||
if (oilField == nullptr) continue;
|
||||
if(oilField->formationNamesCollection() != nullptr)
|
||||
{
|
||||
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++)
|
||||
{
|
||||
RimOilField* oilField = m_project->oilFields[oilFieldIdx];
|
||||
if (oilField == NULL) continue;
|
||||
if (oilField->wellPathCollection == NULL)
|
||||
if (oilField == nullptr) continue;
|
||||
if (oilField->wellPathCollection == nullptr)
|
||||
{
|
||||
//printf("Create well path collection for oil field %i in loadProject.\n", oilFieldIdx);
|
||||
oilField->wellPathCollection = new RimWellPathCollection();
|
||||
@ -488,7 +488,7 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
|
||||
|
||||
for (RimOilField* oilField: m_project->oilFields)
|
||||
{
|
||||
if (oilField == NULL) continue;
|
||||
if (oilField == nullptr) continue;
|
||||
// Temporary
|
||||
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++)
|
||||
{
|
||||
RimOilField* oilField = m_project->oilFields[oilFieldIdx];
|
||||
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : NULL;
|
||||
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : nullptr;
|
||||
if (analysisModels)
|
||||
{
|
||||
analysisModels->recomputeStatisticsForAllCaseGroups();
|
||||
@ -641,7 +641,7 @@ bool RiaApplication::loadProject(const QString& projectFileName, ProjectLoadActi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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)
|
||||
{
|
||||
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();
|
||||
if (oilField == NULL) return;
|
||||
if (oilField == nullptr) return;
|
||||
|
||||
if (oilField->wellPathCollection == NULL)
|
||||
if (oilField->wellPathCollection == nullptr)
|
||||
{
|
||||
//printf("Create well path collection.\n");
|
||||
oilField->wellPathCollection = new RimWellPathCollection();
|
||||
@ -895,7 +895,7 @@ bool RiaApplication::saveProjectPromptForFileName()
|
||||
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())
|
||||
{
|
||||
return false;
|
||||
@ -972,7 +972,7 @@ bool RiaApplication::saveProjectAs(const QString& fileName)
|
||||
|
||||
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;
|
||||
}
|
||||
@ -1098,10 +1098,10 @@ bool RiaApplication::openOdbCaseFromFile(const QString& fileName)
|
||||
geoMechCase->setFileName(fileName);
|
||||
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
|
||||
if (geoMechModelCollection == NULL)
|
||||
if (geoMechModelCollection == nullptr)
|
||||
{
|
||||
geoMechModelCollection = new RimGeoMechModels();
|
||||
m_project->activeOilField()->geoMechModels = geoMechModelCollection;
|
||||
@ -1343,7 +1343,7 @@ int RiaApplication::launchUnitTestsWithConsole()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiaApplication::createMainPlotWindow()
|
||||
{
|
||||
CVF_ASSERT(m_mainPlotWindow == NULL);
|
||||
CVF_ASSERT(m_mainPlotWindow == nullptr);
|
||||
|
||||
m_mainPlotWindow = new RiuMainPlotWindow;
|
||||
|
||||
@ -1361,7 +1361,7 @@ void RiaApplication::deleteMainPlotWindow()
|
||||
if (m_mainPlotWindow)
|
||||
{
|
||||
m_mainPlotWindow->deleteLater();
|
||||
m_mainPlotWindow = NULL;
|
||||
m_mainPlotWindow = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1415,7 +1415,7 @@ RiuMainWindowBase* RiaApplication::mainWindowByID(int mainWindowID)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimViewWindow* RiaApplication::activeViewWindow()
|
||||
{
|
||||
RimViewWindow* viewWindow = NULL;
|
||||
RimViewWindow* viewWindow = nullptr;
|
||||
|
||||
QWidget* mainWindowWidget = RiaApplication::activeWindow();
|
||||
|
||||
@ -1609,7 +1609,7 @@ void RiaApplication::slotWorkerProcessFinished(int exitCode, QProcess::ExitStatu
|
||||
{
|
||||
m_workerProcess->close();
|
||||
}
|
||||
m_workerProcess = NULL;
|
||||
m_workerProcess = nullptr;
|
||||
|
||||
// Either the work process crashed or was aborted by the user
|
||||
if (exitStatus == QProcess::CrashExit)
|
||||
@ -1649,7 +1649,7 @@ void RiaApplication::slotWorkerProcessFinished(int exitCode, QProcess::ExitStatu
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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 (!m_currentCaseIds.empty())
|
||||
@ -1701,7 +1701,7 @@ bool RiaApplication::launchProcess(const QString& program, const QStringList& ar
|
||||
if (!m_workerProcess->waitForStarted(1000))
|
||||
{
|
||||
m_workerProcess->close();
|
||||
m_workerProcess = NULL;
|
||||
m_workerProcess = nullptr;
|
||||
m_runningWorkerProcess = false;
|
||||
|
||||
RiuMainWindow::instance()->processMonitor()->stopMonitorWorkProcess();
|
||||
@ -1715,7 +1715,7 @@ bool RiaApplication::launchProcess(const QString& program, const QStringList& ar
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -1825,7 +1825,7 @@ void RiaApplication::terminateProcess()
|
||||
}
|
||||
|
||||
m_runningWorkerProcess = false;
|
||||
m_workerProcess = NULL;
|
||||
m_workerProcess = nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -92,8 +92,8 @@ bool RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl(const QStr
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* project = app->project();
|
||||
|
||||
RimEclipseCaseCollection* analysisModels = project->activeOilField() ? project->activeOilField()->analysisModels() : NULL;
|
||||
if (analysisModels == NULL) return false;
|
||||
RimEclipseCaseCollection* analysisModels = project->activeOilField() ? project->activeOilField()->analysisModels() : nullptr;
|
||||
if (analysisModels == nullptr) return false;
|
||||
|
||||
RiuMainWindow::instance()->show();
|
||||
|
||||
@ -114,7 +114,7 @@ bool RiaImportEclipseCaseTools::openEclipseCaseShowTimeStepFilterImpl(const QStr
|
||||
|
||||
// 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)
|
||||
{
|
||||
{
|
||||
@ -193,9 +193,9 @@ bool RiaImportEclipseCaseTools::addEclipseCases(const QStringList& fileNames)
|
||||
// First file is read completely including grid.
|
||||
// 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
|
||||
RimEclipseResultCase* mainResultCase = NULL;
|
||||
RimEclipseResultCase* mainResultCase = nullptr;
|
||||
std::vector< std::vector<int> > mainCaseGridDimensions;
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = NULL;
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
|
||||
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
RimProject* project = app->project();
|
||||
|
@ -157,7 +157,7 @@ void RiaDefaultConsoleLogger::writeToConsole(const std::string& str)
|
||||
DWORD stringLength = static_cast<DWORD>(str.length());
|
||||
|
||||
unsigned long iDum = 0;
|
||||
WriteConsoleA(hStdOutputHandle, str.c_str(), stringLength, &iDum, NULL);
|
||||
WriteConsoleA(hStdOutputHandle, str.c_str(), stringLength, &iDum, nullptr);
|
||||
}
|
||||
#else
|
||||
fputs(str.c_str(), stderr);
|
||||
@ -203,7 +203,7 @@ void RiaLogging::setLoggerInstance(RiaLogger* loggerInstance)
|
||||
void RiaLogging::deleteLoggerInstance()
|
||||
{
|
||||
delete sm_logger;
|
||||
sm_logger = NULL;
|
||||
sm_logger = nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -125,7 +125,7 @@ void RiaProjectModifier::replaceSourceCases(RimProject* project)
|
||||
{
|
||||
for (RimOilField* oilField : project->oilFields())
|
||||
{
|
||||
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : NULL;
|
||||
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : nullptr;
|
||||
if (analysisModels)
|
||||
{
|
||||
for (RimIdenticalGridCaseGroup* caseGroup : analysisModels->caseGroups)
|
||||
@ -280,7 +280,7 @@ int RiaProjectModifier::firstGroupId(RimProject* project)
|
||||
for (size_t oilFieldIdx = 0; oilFieldIdx < project->oilFields().size(); oilFieldIdx++)
|
||||
{
|
||||
RimOilField* oilField = project->oilFields[oilFieldIdx];
|
||||
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : NULL;
|
||||
RimEclipseCaseCollection* analysisModels = oilField ? oilField->analysisModels() : nullptr;
|
||||
if (analysisModels)
|
||||
{
|
||||
if (analysisModels->caseGroups.size() > 0)
|
||||
|
@ -47,7 +47,7 @@ void RicEditPreferencesFeature::onActionTriggered(bool isChecked)
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
QStringList tabNames = app->preferences()->tabNames();
|
||||
RiuPropertyViewTabWidget propertyDialog(NULL, app->preferences(), "Preferences", tabNames);
|
||||
RiuPropertyViewTabWidget propertyDialog(nullptr, app->preferences(), "Preferences", tabNames);
|
||||
if (propertyDialog.exec() == QDialog::Accepted)
|
||||
{
|
||||
// Write preferences using QSettings and apply them to the application
|
||||
|
@ -50,7 +50,7 @@ void RicHelpAboutFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
this->disableModelChangeContribution();
|
||||
|
||||
caf::AboutDialog dlg(NULL);
|
||||
caf::AboutDialog dlg(nullptr);
|
||||
|
||||
dlg.setApplicationName(RI_APPLICATION_NAME);
|
||||
dlg.setApplicationVersion(RiaApplication::getVersionStringApp(true));
|
||||
|
@ -46,7 +46,7 @@ void RicOpenProjectFeature::onActionTriggered(bool isChecked)
|
||||
if (!app->askUserToSaveModifiedProject()) return;
|
||||
|
||||
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;
|
||||
|
||||
|
@ -49,7 +49,7 @@ void RicAppendIntersectionFeature::onActionTriggered(bool isChecked)
|
||||
caf::SelectionManager::instance()->objectsByType(&collection);
|
||||
CVF_ASSERT(collection.size() == 1);
|
||||
|
||||
RimIntersectionCollection* intersectionCollection = NULL;
|
||||
RimIntersectionCollection* intersectionCollection = nullptr;
|
||||
collection[0]->firstAncestorOrThisOfType(intersectionCollection);
|
||||
|
||||
CVF_ASSERT(intersectionCollection);
|
||||
@ -71,7 +71,7 @@ void RicAppendIntersectionFeature::setupActionLook(QAction* actionToSetup)
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicAppendIntersectionFeatureCmd::RicAppendIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection)
|
||||
: CmdExecuteCommand(NULL),
|
||||
: CmdExecuteCommand(nullptr),
|
||||
m_intersectionCollection(intersectionCollection)
|
||||
{
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ void RicNewAzimuthDipIntersectionFeature::setupActionLook(QAction* actionToSetup
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicNewAzimuthDipIntersectionFeatureCmd::RicNewAzimuthDipIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection)
|
||||
: CmdExecuteCommand(NULL),
|
||||
: CmdExecuteCommand(nullptr),
|
||||
m_intersectionCollection(intersectionCollection)
|
||||
{
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ void RicNewPolylineIntersectionFeature::setupActionLook(QAction* actionToSetup)
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicNewPolylineIntersectionFeatureCmd::RicNewPolylineIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection)
|
||||
: CmdExecuteCommand(NULL),
|
||||
: CmdExecuteCommand(nullptr),
|
||||
m_intersectionCollection(intersectionCollection)
|
||||
{
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ void RicNewSimWellIntersectionFeature::onActionTriggered(bool isChecked)
|
||||
|
||||
RimSimWellInView* simWell = collection[0];
|
||||
|
||||
RimEclipseView* eclView = NULL;
|
||||
RimEclipseView* eclView = nullptr;
|
||||
simWell->firstAncestorOrThisOfType(eclView);
|
||||
CVF_ASSERT(eclView);
|
||||
|
||||
@ -73,7 +73,7 @@ void RicNewSimWellIntersectionFeature::setupActionLook(QAction* actionToSetup)
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicNewSimWellIntersectionCmd::RicNewSimWellIntersectionCmd(RimIntersectionCollection* intersectionCollection, RimSimWellInView* simWell)
|
||||
: CmdExecuteCommand(NULL),
|
||||
: CmdExecuteCommand(nullptr),
|
||||
m_intersectionCollection(intersectionCollection),
|
||||
m_simWell(simWell)
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ void RicNewWellPathIntersectionFeature::setupActionLook(QAction* actionToSetup)
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicNewWellPathIntersectionFeatureCmd::RicNewWellPathIntersectionFeatureCmd(RimIntersectionCollection* intersectionCollection, RimWellPath* wellPath)
|
||||
: CmdExecuteCommand(NULL),
|
||||
: CmdExecuteCommand(nullptr),
|
||||
m_intersectionCollection(intersectionCollection),
|
||||
m_wellPath(wellPath)
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT(RicAddEclipseInputPropertyFeature, "RicAddEclipseInputProper
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicAddEclipseInputPropertyFeature::isCommandEnabled()
|
||||
{
|
||||
return selectedInputPropertyCollection() != NULL;
|
||||
return selectedInputPropertyCollection() != nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -43,10 +43,10 @@ bool RicComputeStatisticsFeature::isCommandEnabled()
|
||||
RimEclipseStatisticsCase* statisticsCase = selection[0];
|
||||
if (statisticsCase)
|
||||
{
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = NULL;
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
|
||||
statisticsCase->firstAncestorOrThisOfType(gridCaseGroup);
|
||||
|
||||
RimCaseCollection* caseCollection = gridCaseGroup ? gridCaseGroup->caseCollection() : NULL;
|
||||
RimCaseCollection* caseCollection = gridCaseGroup ? gridCaseGroup->caseCollection() : nullptr;
|
||||
return caseCollection ? caseCollection->reservoirs.size() > 0 : false;
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ void RicCreateGridCaseGroupFromFilesFeature::onActionTriggered(bool isChecked)
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
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
|
||||
m_pathFilter = result.pathFilter;
|
||||
|
@ -33,7 +33,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicEclipseCaseNewGroupExec::RicEclipseCaseNewGroupExec()
|
||||
: CmdExecuteCommand(NULL)
|
||||
: CmdExecuteCommand(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ void RicEclipseCaseNewGroupExec::redo()
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
CVF_ASSERT(proj);
|
||||
|
||||
RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels() : NULL;
|
||||
RimEclipseCaseCollection* analysisModels = proj->activeOilField() ? proj->activeOilField()->analysisModels() : nullptr;
|
||||
|
||||
if (analysisModels)
|
||||
{
|
||||
|
@ -91,7 +91,7 @@ void RicEclipsePropertyFilterFeatureImpl::insertPropertyFilter(RimEclipsePropert
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicEclipsePropertyFilterFeatureImpl::isPropertyFilterCommandAvailable(caf::PdmObjectHandle* object)
|
||||
{
|
||||
Rim3dView* rimView = NULL;
|
||||
Rim3dView* rimView = nullptr;
|
||||
object->firstAncestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
|
@ -31,7 +31,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicEclipsePropertyFilterInsertExec::RicEclipsePropertyFilterInsertExec(RimEclipsePropertyFilter* propertyFilter)
|
||||
: CmdExecuteCommand(NULL)
|
||||
: CmdExecuteCommand(nullptr)
|
||||
{
|
||||
CVF_ASSERT(propertyFilter);
|
||||
m_propertyFilter = propertyFilter;
|
||||
|
@ -30,7 +30,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicEclipsePropertyFilterNewExec::RicEclipsePropertyFilterNewExec(RimEclipsePropertyFilterCollection* propertyFilterCollection)
|
||||
: CmdExecuteCommand(NULL)
|
||||
: CmdExecuteCommand(nullptr)
|
||||
{
|
||||
assert(propertyFilterCollection);
|
||||
m_propertyFilterCollection = propertyFilterCollection;
|
||||
|
@ -52,7 +52,7 @@ void RicImportEclipseCasesFeature::onActionTriggered(bool isChecked)
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
QString defaultDir = app->lastUsedDialogDirectory("BINARY_GRID");
|
||||
|
||||
RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(NULL,
|
||||
RicFileHierarchyDialogResult result = RicFileHierarchyDialog::getOpenFileNames(nullptr,
|
||||
"Import Eclipse Cases",
|
||||
defaultDir,
|
||||
m_pathFilter,
|
||||
|
@ -39,7 +39,7 @@ CAF_CMD_SOURCE_INIT(RicNewStatisticsCaseFeature, "RicNewStatisticsCaseFeature");
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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)
|
||||
{
|
||||
RimIdenticalGridCaseGroup* caseGroup = NULL;
|
||||
RimIdenticalGridCaseGroup* caseGroup = nullptr;
|
||||
|
||||
if (dynamic_cast<RimEclipseStatisticsCase*>(uiItem))
|
||||
{
|
||||
@ -122,6 +122,6 @@ RimEclipseStatisticsCase* RicNewStatisticsCaseFeature::addStatisticalCalculation
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ void RicExportFaultsFeature::onActionTriggered(bool isChecked)
|
||||
QString projectFolder = app->currentProjectPath();
|
||||
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()) {
|
||||
// Stop if folder selection was cancelled.
|
||||
|
@ -79,7 +79,7 @@ void RicExportToLasFileFeature::onActionTriggered(bool isChecked)
|
||||
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);
|
||||
propertyDialog.resize(QSize(400, 200));
|
||||
|
||||
|
@ -46,7 +46,7 @@ CAF_CMD_SOURCE_INIT(RicSaveEclipseInputPropertyFeature, "RicSaveEclipseInputProp
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicSaveEclipseInputPropertyFeature::isCommandEnabled()
|
||||
{
|
||||
return selectedInputProperty() != NULL;
|
||||
return selectedInputProperty() != nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -78,7 +78,7 @@ void RicSaveEclipseInputPropertyFeature::onActionTriggered(bool isChecked)
|
||||
exportSettings.eclipseKeyword = inputProperty->eclipseKeyword;
|
||||
|
||||
// Find input reservoir for this property
|
||||
RimEclipseInputCase* inputReservoir = NULL;
|
||||
RimEclipseInputCase* inputReservoir = nullptr;
|
||||
{
|
||||
RimEclipseInputPropertyCollection* inputPropertyCollection = dynamic_cast<RimEclipseInputPropertyCollection*>(inputProperty->parentField()->ownerObject());
|
||||
if (!inputPropertyCollection) return;
|
||||
|
@ -45,7 +45,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicSaveEclipseResultAsInputPropertyExec::RicSaveEclipseResultAsInputPropertyExec(RimEclipseCellColors* cellColors)
|
||||
: CmdExecuteCommand(NULL)
|
||||
: CmdExecuteCommand(nullptr)
|
||||
{
|
||||
CVF_ASSERT(cellColors);
|
||||
m_cellColors = cellColors;
|
||||
|
@ -90,7 +90,7 @@ void RicSnapshotViewToFileFeature::saveToFile(const QImage& image, const QString
|
||||
}
|
||||
|
||||
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())
|
||||
{
|
||||
return;
|
||||
|
@ -67,7 +67,7 @@ void RicIntersectionBoxAtPosFeature::onActionTriggered(bool isChecked)
|
||||
coll->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
|
||||
|
||||
RimGridView* rimView = NULL;
|
||||
RimGridView* rimView = nullptr;
|
||||
coll->firstAncestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ void RicIntersectionBoxXSliceFeature::onActionTriggered(bool isChecked)
|
||||
coll->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
|
||||
|
||||
RimGridView* rimView = NULL;
|
||||
RimGridView* rimView = nullptr;
|
||||
coll->firstAncestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ void RicIntersectionBoxYSliceFeature::onActionTriggered(bool isChecked)
|
||||
coll->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
|
||||
|
||||
RimGridView* rimView = NULL;
|
||||
RimGridView* rimView = nullptr;
|
||||
coll->firstAncestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ void RicIntersectionBoxZSliceFeature::onActionTriggered(bool isChecked)
|
||||
coll->updateConnectedEditors();
|
||||
RiuMainWindow::instance()->selectAsCurrentItem(intersectionBox);
|
||||
|
||||
RimGridView* rimView = NULL;
|
||||
RimGridView* rimView = nullptr;
|
||||
coll->firstAncestorOrThisOfType(rimView);
|
||||
if (rimView)
|
||||
{
|
||||
|
@ -86,7 +86,7 @@ void RicNewScriptFeature::onActionTriggered(bool isChecked)
|
||||
}
|
||||
|
||||
bool ok;
|
||||
fullPathFilenameNewScript = QInputDialog::getText(NULL,
|
||||
fullPathFilenameNewScript = QInputDialog::getText(nullptr,
|
||||
"Specify new script file",
|
||||
"File name",
|
||||
QLineEdit::Normal,
|
||||
|
@ -126,7 +126,7 @@ void RicPasteEclipseCasesFeature::addCasesToGridCaseGroup(caf::PdmObjectGroup& o
|
||||
return;
|
||||
}
|
||||
|
||||
RimEclipseResultCase* mainResultCase = NULL;
|
||||
RimEclipseResultCase* mainResultCase = nullptr;
|
||||
std::vector< std::vector<int> > mainCaseGridDimensions;
|
||||
|
||||
// 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;
|
||||
RimEclipseCaseCollection* analysisModels = (activeOilField) ? activeOilField->analysisModels() : NULL;
|
||||
RimOilField* activeOilField = proj ? proj->activeOilField() : nullptr;
|
||||
RimEclipseCaseCollection* analysisModels = (activeOilField) ? activeOilField->analysisModels() : nullptr;
|
||||
if (analysisModels) analysisModels->insertCaseInCaseGroup(gridCaseGroup, rimResultReservoir);
|
||||
|
||||
caf::PdmDocument::updateUiIconStateRecursively(rimResultReservoir);
|
||||
|
@ -95,13 +95,13 @@ RimIdenticalGridCaseGroup* RicPasteFeatureImpl::findGridCaseGroup(caf::PdmObject
|
||||
else if (dynamic_cast<RimCaseCollection*>(objectHandle) ||
|
||||
dynamic_cast<RimEclipseCase*>(objectHandle))
|
||||
{
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = NULL;
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
|
||||
objectHandle->firstAncestorOrThisOfType(gridCaseGroup);
|
||||
|
||||
return gridCaseGroup;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -120,7 +120,7 @@ RimEclipseCase* RicPasteFeatureImpl::findEclipseCase(caf::PdmObjectHandle* objec
|
||||
return reservoirView->eclipseCase();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -49,7 +49,7 @@ CAF_CMD_SOURCE_INIT(RicCloseCaseFeature, "RicCloseCaseFeature");
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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 NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -118,7 +118,7 @@ RimGeoMechCase* RicCloseCaseFeature::selectedGeoMechCase() const
|
||||
return selection[0];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -129,8 +129,8 @@ void RicCloseCaseFeature::removeCaseFromAllGroups(RimEclipseCase* eclipseCase)
|
||||
CVF_ASSERT(eclipseCase);
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
RimOilField* activeOilField = proj ? proj->activeOilField() : NULL;
|
||||
RimEclipseCaseCollection* analysisModels = (activeOilField) ? activeOilField->analysisModels() : NULL;
|
||||
RimOilField* activeOilField = proj ? proj->activeOilField() : nullptr;
|
||||
RimEclipseCaseCollection* analysisModels = (activeOilField) ? activeOilField->analysisModels() : nullptr;
|
||||
if (analysisModels)
|
||||
{
|
||||
analysisModels->removeCaseFromAllGroups(eclipseCase);
|
||||
@ -197,8 +197,8 @@ void RicCloseCaseFeature::deleteGeoMechCase(RimGeoMechCase* geoMechCase)
|
||||
CVF_ASSERT(geoMechCase);
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
RimOilField* activeOilField = proj ? proj->activeOilField() : NULL;
|
||||
RimGeoMechModels* models = (activeOilField) ? activeOilField->geoMechModels() : NULL;
|
||||
RimOilField* activeOilField = proj ? proj->activeOilField() : nullptr;
|
||||
RimGeoMechModels* models = (activeOilField) ? activeOilField->geoMechModels() : nullptr;
|
||||
if (models)
|
||||
{
|
||||
models->cases.removeChildObject(geoMechCase);
|
||||
@ -240,7 +240,7 @@ bool RicCloseCaseFeature::userConfirmedGridCaseGroupChange(const std::vector<Rim
|
||||
|
||||
for (size_t i = 0; i < casesToBeDeleted.size(); i++)
|
||||
{
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = NULL;
|
||||
RimIdenticalGridCaseGroup* gridCaseGroup = nullptr;
|
||||
casesToBeDeleted[i]->firstAncestorOrThisOfType(gridCaseGroup);
|
||||
|
||||
if (gridCaseGroup && hasAnyStatisticsResults(gridCaseGroup))
|
||||
|
@ -97,7 +97,7 @@ void RicDeleteItemExec::redo()
|
||||
caf::PdmObjectHandle* parentObj = listField->ownerObject();
|
||||
parentObj->uiCapability()->updateConnectedEditors();
|
||||
|
||||
Rim3dView* view = NULL;
|
||||
Rim3dView* view = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType(view);
|
||||
|
||||
// Range Filters
|
||||
@ -107,7 +107,7 @@ void RicDeleteItemExec::redo()
|
||||
|
||||
if (rangeFilterColl)
|
||||
{
|
||||
rangeFilterColl->updateDisplayModeNotifyManagedViews(NULL);
|
||||
rangeFilterColl->updateDisplayModeNotifyManagedViews(nullptr);
|
||||
}
|
||||
|
||||
// Prop Filter
|
||||
@ -219,7 +219,7 @@ void RicDeleteItemExec::redo()
|
||||
{
|
||||
if (wellLogPlotCollection->wellLogPlots.empty())
|
||||
{
|
||||
RimProject* project = NULL;
|
||||
RimProject* project = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType(project);
|
||||
if (project)
|
||||
{
|
||||
@ -230,13 +230,13 @@ void RicDeleteItemExec::redo()
|
||||
|
||||
// Linked views
|
||||
|
||||
RimViewLinkerCollection* viewLinkerCollection = NULL;
|
||||
RimViewLinkerCollection* viewLinkerCollection = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType(viewLinkerCollection);
|
||||
if (viewLinkerCollection)
|
||||
{
|
||||
viewLinkerCollection->uiCapability()->updateConnectedEditors();
|
||||
|
||||
RimProject* project = NULL;
|
||||
RimProject* project = nullptr;
|
||||
parentObj->firstAncestorOrThisOfType(project);
|
||||
if (project)
|
||||
{
|
||||
|
@ -273,7 +273,7 @@ void RicFileHierarchyDialog::clearFileList()
|
||||
void RicFileHierarchyDialog::updateStatus(Status status, bool force)
|
||||
{
|
||||
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 (!force && now == lastStatusUpdate) return;
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
RicFileHierarchyDialog(QWidget* parent);
|
||||
~RicFileHierarchyDialog();
|
||||
|
||||
static RicFileHierarchyDialogResult getOpenFileNames(QWidget *parent = 0,
|
||||
static RicFileHierarchyDialogResult getOpenFileNames(QWidget *parent = nullptr,
|
||||
const QString& caption = QString(),
|
||||
const QString& dir = QString(),
|
||||
const QString& pathFilter = QString(),
|
||||
|
@ -31,7 +31,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicGeoMechPropertyFilterInsertExec::RicGeoMechPropertyFilterInsertExec(RimGeoMechPropertyFilter* propertyFilter)
|
||||
: CmdExecuteCommand(NULL)
|
||||
: CmdExecuteCommand(nullptr)
|
||||
{
|
||||
CVF_ASSERT(propertyFilter);
|
||||
m_propertyFilter = propertyFilter;
|
||||
|
@ -29,7 +29,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicGeoMechPropertyFilterNewExec::RicGeoMechPropertyFilterNewExec(RimGeoMechPropertyFilterCollection* propertyFilterCollection)
|
||||
: CmdExecuteCommand(NULL)
|
||||
: CmdExecuteCommand(nullptr)
|
||||
{
|
||||
assert(propertyFilterCollection);
|
||||
m_propertyFilterCollection = propertyFilterCollection;
|
||||
|
@ -41,7 +41,7 @@ void RicImportGeoMechCaseFeature::onActionTriggered(bool isChecked)
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
|
||||
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();
|
||||
app->setLastUsedDialogDirectory("GEOMECH_MODEL", defaultDir);
|
||||
|
||||
|
@ -54,7 +54,7 @@ void RicImportSummaryCaseFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
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;
|
||||
|
||||
|
@ -57,7 +57,7 @@ void RicImportSummaryCasesFeature::onActionTriggered(bool isChecked)
|
||||
RiaApplication* app = RiaApplication::instance();
|
||||
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
|
||||
m_pathFilter = result.pathFilter;
|
||||
|
@ -52,10 +52,10 @@ void RicNewViewFeature::addReservoirView(RimEclipseCase* eclipseCase, RimGeoMech
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewViewFeature::isCommandEnabled()
|
||||
{
|
||||
return selectedEclipseCase() != NULL
|
||||
|| selectedEclipseView() != NULL
|
||||
|| selectedGeoMechCase() != NULL
|
||||
|| selectedGeoMechView() != NULL;
|
||||
return selectedEclipseCase() != nullptr
|
||||
|| selectedEclipseView() != nullptr
|
||||
|| selectedGeoMechCase() != nullptr
|
||||
|| selectedGeoMechView() != nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -91,7 +91,7 @@ void RicNewViewFeature::setupActionLook(QAction* actionToSetup)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim3dView* RicNewViewFeature::createReservoirView(RimEclipseCase* eclipseCase, RimGeoMechCase* geomCase)
|
||||
{
|
||||
Rim3dView* insertedView = NULL;
|
||||
Rim3dView* insertedView = nullptr;
|
||||
|
||||
if (eclipseCase)
|
||||
{
|
||||
@ -131,7 +131,7 @@ RimEclipseCase* RicNewViewFeature::selectedEclipseCase()
|
||||
return selection[0];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -147,7 +147,7 @@ RimGeoMechCase* RicNewViewFeature::selectedGeoMechCase()
|
||||
return selection[0];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -163,7 +163,7 @@ RimEclipseView* RicNewViewFeature::selectedEclipseView()
|
||||
return selection[0];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -179,5 +179,5 @@ RimGeoMechView* RicNewViewFeature::selectedGeoMechView()
|
||||
return selection[0];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicRangeFilterExecImpl::RicRangeFilterExecImpl(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter)
|
||||
: CmdExecuteCommand(NULL)
|
||||
: CmdExecuteCommand(nullptr)
|
||||
{
|
||||
CVF_ASSERT(rangeFilterCollection);
|
||||
m_cellRangeFilterCollection = rangeFilterCollection;
|
||||
|
@ -31,7 +31,7 @@ class RimCellRangeFilterCollection;
|
||||
class RicRangeFilterExecImpl : public caf::CmdExecuteCommand
|
||||
{
|
||||
public:
|
||||
RicRangeFilterExecImpl(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = 0);
|
||||
RicRangeFilterExecImpl(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = nullptr);
|
||||
virtual ~RicRangeFilterExecImpl();
|
||||
|
||||
virtual QString name() = 0;
|
||||
|
@ -65,7 +65,7 @@ void RicRangeFilterInsertExec::redo()
|
||||
rangeFilter->setDefaultValues();
|
||||
applyCommandDataOnFilter(rangeFilter);
|
||||
|
||||
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL);
|
||||
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(nullptr);
|
||||
|
||||
m_cellRangeFilterCollection->updateConnectedEditors();
|
||||
|
||||
|
@ -30,7 +30,7 @@ class RimCellRangeFilterCollection;
|
||||
class RicRangeFilterInsertExec : public RicRangeFilterExecImpl
|
||||
{
|
||||
public:
|
||||
RicRangeFilterInsertExec(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = 0);
|
||||
RicRangeFilterInsertExec(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = nullptr);
|
||||
virtual ~RicRangeFilterInsertExec();
|
||||
|
||||
virtual QString name();
|
||||
|
@ -71,7 +71,7 @@ void RicRangeFilterNewExec::redo()
|
||||
rangeFilter->setDefaultValues();
|
||||
applyCommandDataOnFilter(rangeFilter);
|
||||
|
||||
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL);
|
||||
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(nullptr);
|
||||
|
||||
m_cellRangeFilterCollection->updateConnectedEditors();
|
||||
|
||||
@ -94,7 +94,7 @@ void RicRangeFilterNewExec::undo()
|
||||
|
||||
m_cellRangeFilterCollection->rangeFilters.erase(m_cellRangeFilterCollection->rangeFilters.size() - 1);
|
||||
|
||||
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(NULL);
|
||||
m_cellRangeFilterCollection->updateDisplayModeNotifyManagedViews(nullptr);
|
||||
|
||||
m_cellRangeFilterCollection->updateConnectedEditors();
|
||||
}
|
@ -27,7 +27,7 @@
|
||||
class RicRangeFilterNewExec : public RicRangeFilterExecImpl
|
||||
{
|
||||
public:
|
||||
RicRangeFilterNewExec(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = 0);
|
||||
RicRangeFilterNewExec(RimCellRangeFilterCollection* rangeFilterCollection, RimCellRangeFilter* rangeFilter = nullptr);
|
||||
virtual ~RicRangeFilterNewExec();
|
||||
|
||||
virtual QString name();
|
||||
|
@ -47,7 +47,7 @@ RimEclipseView* RicSelectOrCreateViewFeatureImpl::showViewSelection(RimEclipseRe
|
||||
featureUi.setCase(resultCase);
|
||||
}
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, dialogTitle, "");
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, dialogTitle, "");
|
||||
propertyDialog.resize(QSize(400, 200));
|
||||
|
||||
if (propertyDialog.exec() != QDialog::Accepted) return nullptr;
|
||||
|
@ -112,7 +112,7 @@ RimSummaryPlot* RicNewGridTimeHistoryCurveFeature::userSelectedSummaryPlot()
|
||||
QString newPlotName = RicNewGridTimeHistoryCurveFeature::suggestedNewPlotName();
|
||||
featureUi.setSuggestedPlotName(newPlotName);
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, "Select Destination Plot", "");
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, "Select Destination Plot", "");
|
||||
propertyDialog.resize(QSize(400, 200));
|
||||
|
||||
if (propertyDialog.exec() != QDialog::Accepted) return nullptr;
|
||||
|
@ -84,7 +84,7 @@ void RicPasteAsciiDataToSummaryPlotFeature::onActionTriggered(bool isChecked)
|
||||
if (!summaryPlot) pasteOptions.createNewPlot();
|
||||
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;
|
||||
|
||||
std::vector<RimAsciiDataCurve*> curves = parseCurves(text, pasteOptions);
|
||||
|
@ -692,7 +692,7 @@ void RicSummaryCurveCreator::createNewPlot()
|
||||
|
||||
{
|
||||
bool ok = false;
|
||||
candidatePlotName = QInputDialog::getText(NULL,
|
||||
candidatePlotName = QInputDialog::getText(nullptr,
|
||||
"New Summary Plot Name", "New Summary Plot Name",
|
||||
QLineEdit::Normal,
|
||||
candidatePlotName,
|
||||
|
@ -152,7 +152,7 @@ void RicLinkVisibleViewsFeature::linkViews(std::vector<RimGridView*>& views)
|
||||
RicLinkVisibleViewsFeatureUi featureUi;
|
||||
featureUi.setViews(views);
|
||||
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(NULL, &featureUi, "Select Master View", "");
|
||||
caf::PdmUiPropertyViewDialog propertyDialog(nullptr, &featureUi, "Select Master View", "");
|
||||
propertyDialog.setWindowIcon(QIcon(":/chain.png"));
|
||||
if (propertyDialog.exec() != QDialog::Accepted) return;
|
||||
|
||||
|
@ -49,7 +49,7 @@ void RicShowAllLinkedViewsFeature::onActionTriggered(bool isChecked)
|
||||
caf::SelectionManager::instance()->objectsByType(&managedViews);
|
||||
for (size_t i = 0; i < managedViews.size(); i++)
|
||||
{
|
||||
RimViewLinker* rimLinked = NULL;
|
||||
RimViewLinker* rimLinked = nullptr;
|
||||
managedViews[i]->firstAncestorOrThisOfType(rimLinked);
|
||||
CVF_ASSERT(rimLinked);
|
||||
|
||||
|
@ -75,10 +75,10 @@ void RicAddWellLogToPlotFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RimWellLogFileChannel* wellLog = selection[wlIdx];
|
||||
|
||||
RimWellPath* wellPath = NULL;
|
||||
RimWellPath* wellPath = nullptr;
|
||||
wellLog->firstAncestorOrThisOfType(wellPath);
|
||||
|
||||
RimWellLogFile* wellLogFile = NULL;
|
||||
RimWellLogFile* wellLogFile = nullptr;
|
||||
wellLog->firstAncestorOrThisOfType(wellLogFile);
|
||||
if (wellLogFile)
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ bool RicDeleteWellLogPlotTrackFeature::isCommandEnabled()
|
||||
|
||||
if (selection.size() > 0)
|
||||
{
|
||||
RimWellLogPlot* wellLogPlot = NULL;
|
||||
RimWellLogPlot* wellLogPlot = nullptr;
|
||||
selection[0]->firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot && wellLogPlot->trackCount() > 1)
|
||||
{
|
||||
@ -68,7 +68,7 @@ void RicDeleteWellLogPlotTrackFeature::onActionTriggered(bool isChecked)
|
||||
{
|
||||
RimWellLogTrack* track = selection[i];
|
||||
|
||||
RimWellLogPlot* wellLogPlot = NULL;
|
||||
RimWellLogPlot* wellLogPlot = nullptr;
|
||||
track->firstAncestorOrThisOfType(wellLogPlot);
|
||||
if (wellLogPlot && wellLogPlot->trackCount() > 1)
|
||||
{
|
||||
|
@ -44,7 +44,7 @@ bool RicNewWellLogPlotTrackFeature::isCommandEnabled()
|
||||
return false;
|
||||
}
|
||||
|
||||
return selectedWellLogPlot() != NULL;
|
||||
return selectedWellLogPlot() != nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -107,11 +107,11 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigEclipseC
|
||||
|
||||
|
||||
|
||||
ecl_kw_type* specGridKw = NULL;
|
||||
ecl_kw_type* zCornKw = NULL;
|
||||
ecl_kw_type* coordKw = NULL;
|
||||
ecl_kw_type* actNumKw = NULL;
|
||||
ecl_kw_type* mapAxesKw = NULL;
|
||||
ecl_kw_type* specGridKw = nullptr;
|
||||
ecl_kw_type* zCornKw = nullptr;
|
||||
ecl_kw_type* coordKw = nullptr;
|
||||
ecl_kw_type* actNumKw = nullptr;
|
||||
ecl_kw_type* mapAxesKw = nullptr;
|
||||
|
||||
// Try to read all the needed keywords. Early exit if some are not found
|
||||
caf::ProgressInfo progress(8, "Read Grid from Eclipse Input file");
|
||||
@ -121,22 +121,22 @@ bool RifEclipseInputFileTools::openGridFile(const QString& fileName, RigEclipseC
|
||||
bool allKwReadOk = true;
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
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);
|
||||
|
||||
// If ACTNUM is not defined, this pointer will be NULL, which is a valid condition
|
||||
if (actnumPos >= 0)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
@ -645,7 +645,7 @@ void RifEclipseInputFileTools::parseAndReadFaults(const QString& fileName, cvf::
|
||||
|
||||
while (filePos != -1)
|
||||
{
|
||||
readFaults(data, filePos, faults, NULL);
|
||||
readFaults(data, filePos, faults, nullptr);
|
||||
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();
|
||||
|
||||
RigFault* fault = NULL;
|
||||
RigFault* fault = nullptr;
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -307,7 +307,7 @@ int RifEclipseRestartFilesetAccess::reportNumber(const ecl_file_type* ecl_file)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
int RifEclipseRestartFilesetAccess::readUnitsType()
|
||||
{
|
||||
ecl_file_type* ecl_file = NULL;
|
||||
ecl_file_type* ecl_file = nullptr;
|
||||
|
||||
if (m_ecl_files.size() > 0)
|
||||
{
|
||||
|
@ -36,7 +36,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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();
|
||||
headerFile->clear();
|
||||
|
||||
char* myPath = NULL;
|
||||
char* myBase = NULL;
|
||||
char* myExtention = NULL;
|
||||
char* myPath = nullptr;
|
||||
char* myBase = nullptr;
|
||||
char* myExtention = nullptr;
|
||||
|
||||
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 ;
|
||||
|
||||
char* myHeaderFile = NULL;
|
||||
char* myHeaderFile = nullptr;
|
||||
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);
|
||||
@ -107,13 +107,13 @@ QStringList RifEclipseSummaryTools::findSummaryDataFiles(const QString& caseFile
|
||||
QString path;
|
||||
QString base;
|
||||
|
||||
findSummaryHeaderFileInfo(caseFile, NULL, &path, &base, NULL);
|
||||
findSummaryHeaderFileInfo(caseFile, nullptr, &path, &base, nullptr);
|
||||
if (path.isEmpty() || base.isEmpty()) return fileNames;
|
||||
|
||||
char* header_file = NULL;
|
||||
char* header_file = nullptr;
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
char* myPath = NULL;
|
||||
char* myBase = NULL;
|
||||
char* myPath = nullptr;
|
||||
char* myBase = nullptr;
|
||||
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);
|
||||
if (!myHeaderFile)
|
||||
|
@ -44,7 +44,7 @@
|
||||
RifEclipseUnifiedRestartFileAccess::RifEclipseUnifiedRestartFileAccess()
|
||||
: RifEclipseRestartDataAccess()
|
||||
{
|
||||
m_ecl_file = NULL;
|
||||
m_ecl_file = nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -461,7 +461,7 @@ void RifHdf5Reader::getElementResultValues(H5::H5File file, std::string groupNam
|
||||
|
||||
hsize_t dims[2];
|
||||
H5::DataSpace dataspace = dataset.getSpace();
|
||||
dataspace.getSimpleExtentDims(dims, NULL);
|
||||
dataspace.getSimpleExtentDims(dims, nullptr);
|
||||
|
||||
(*resultValues).resize(dims[0]);
|
||||
dataset.read(resultValues->data(), H5::PredType::NATIVE_DOUBLE);
|
||||
|
@ -174,7 +174,7 @@ bool transferGridCellData(RigMainGrid* mainGrid, RigActiveCellInfo* activeCellIn
|
||||
|
||||
// Sub grid in cell
|
||||
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);
|
||||
CVF_ASSERT(subGridId > 0);
|
||||
@ -208,10 +208,10 @@ RifReaderEclipseOutput::RifReaderEclipseOutput()
|
||||
m_fileName.clear();
|
||||
m_filesWithSameBaseName.clear();
|
||||
|
||||
m_eclipseCase = NULL;
|
||||
m_eclipseCase = nullptr;
|
||||
|
||||
m_ecl_init_file = NULL;
|
||||
m_dynamicResultsAccess = NULL;
|
||||
m_ecl_init_file = nullptr;
|
||||
m_dynamicResultsAccess = nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -223,7 +223,7 @@ RifReaderEclipseOutput::~RifReaderEclipseOutput()
|
||||
{
|
||||
ecl_file_close(m_ecl_init_file);
|
||||
}
|
||||
m_ecl_init_file = NULL;
|
||||
m_ecl_init_file = nullptr;
|
||||
|
||||
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)
|
||||
{
|
||||
segment = NULL;
|
||||
segment = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1696,11 +1696,11 @@ void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid, boo
|
||||
accLengthFromLastConnection += well_segment_get_length(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)
|
||||
{
|
||||
aboveOutletSegment = NULL;
|
||||
aboveOutletSegment = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1740,7 +1740,7 @@ void RifReaderEclipseOutput::readWellCells(const ecl_grid_type* mainEclGrid, boo
|
||||
|
||||
if (well_segment_get_outlet_id(aboveOutletSegment) == -1)
|
||||
{
|
||||
aboveOutletSegment = NULL;
|
||||
aboveOutletSegment = nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ void RifReaderEclipseRft::open()
|
||||
|
||||
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));
|
||||
return;
|
||||
|
@ -33,7 +33,7 @@
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RifReaderEclipseSummary::RifReaderEclipseSummary()
|
||||
: m_ecl_sum(NULL),
|
||||
: m_ecl_sum(nullptr),
|
||||
m_ecl_SmSpec(nullptr)
|
||||
{
|
||||
|
||||
@ -47,7 +47,7 @@ RifReaderEclipseSummary::~RifReaderEclipseSummary()
|
||||
if (m_ecl_sum)
|
||||
{
|
||||
ecl_sum_free(m_ecl_sum);
|
||||
m_ecl_sum = NULL;
|
||||
m_ecl_sum = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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");
|
||||
|
@ -96,9 +96,9 @@ void RivFemElmVisibilityCalculator::computePropertyVisibility(cvf::UByteArray* c
|
||||
const cvf::UByteArray* rangeFilterVisibility,
|
||||
RimGeoMechPropertyFilterCollection* propFilterColl)
|
||||
{
|
||||
CVF_ASSERT(cellVisibility != NULL);
|
||||
CVF_ASSERT(rangeFilterVisibility != NULL);
|
||||
CVF_ASSERT(propFilterColl != NULL);
|
||||
CVF_ASSERT(cellVisibility != nullptr);
|
||||
CVF_ASSERT(rangeFilterVisibility != nullptr);
|
||||
CVF_ASSERT(propFilterColl != nullptr);
|
||||
|
||||
CVF_ASSERT(grid->elementCount() > 0);
|
||||
CVF_ASSERT(rangeFilterVisibility->size() == static_cast<size_t>(grid->elementCount()));
|
||||
@ -255,8 +255,8 @@ void RivFemElmVisibilityCalculator::computeOverriddenCellVisibility(cvf::UByteAr
|
||||
const RigFemPart* femPart,
|
||||
RimViewController* masterViewLink)
|
||||
{
|
||||
CVF_ASSERT(elmVisibilities != NULL);
|
||||
CVF_ASSERT(femPart != NULL);
|
||||
CVF_ASSERT(elmVisibilities != nullptr);
|
||||
CVF_ASSERT(femPart != nullptr);
|
||||
|
||||
RimGridView* masterView = masterViewLink->ownerViewLinker()->masterView();
|
||||
cvf::ref<cvf::UByteArray> totCellVisibility = masterView->currentTotalCellVisibility();
|
||||
|
@ -69,7 +69,7 @@ ref<DrawableGeo> RivFemPartGeometryGenerator::generateSurface()
|
||||
|
||||
CVF_ASSERT(m_quadVertices.notNull());
|
||||
|
||||
if (m_quadVertices->size() == 0) return NULL;
|
||||
if (m_quadVertices->size() == 0) return nullptr;
|
||||
|
||||
ref<DrawableGeo> geo = new DrawableGeo;
|
||||
geo->setFromQuadVertexArray(m_quadVertices.p());
|
||||
@ -85,7 +85,7 @@ ref<DrawableGeo> RivFemPartGeometryGenerator::generateSurface()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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;
|
||||
geo->setVertexArray(m_quadVertices.p());
|
||||
@ -105,7 +105,7 @@ ref<DrawableGeo> RivFemPartGeometryGenerator::createMeshDrawable()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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);
|
||||
|
||||
@ -115,7 +115,7 @@ ref<DrawableGeo> RivFemPartGeometryGenerator::createOutlineMeshDrawable(double c
|
||||
ref<cvf::UIntArray> lineIndices = ee.lineIndices();
|
||||
if (lineIndices->size() == 0)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
ref<PrimitiveSetIndexedUInt> prim = new PrimitiveSetIndexedUInt(PT_LINES);
|
||||
@ -333,7 +333,7 @@ cvf::ref<cvf::DrawableGeo> RivFemPartGeometryGenerator::createMeshDrawableFromSi
|
||||
quadVertices->assign(vertices);
|
||||
}
|
||||
|
||||
if (!(quadVertices.notNull() && quadVertices->size() != 0)) return NULL;
|
||||
if (!(quadVertices.notNull() && quadVertices->size() != 0)) return nullptr;
|
||||
|
||||
ref<DrawableGeo> geo = new DrawableGeo;
|
||||
geo->setVertexArray(quadVertices.p());
|
||||
|
@ -104,7 +104,7 @@ void RivFemPartPartMgr::generatePartGeometry(RivFemPartGeometryGenerator& geoBui
|
||||
bool useBufferObjects = true;
|
||||
// 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();
|
||||
if (geo.notNull())
|
||||
@ -139,7 +139,7 @@ void RivFemPartPartMgr::generatePartGeometry(RivFemPartGeometryGenerator& geoBui
|
||||
|
||||
// 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();
|
||||
if (geoMesh.notNull())
|
||||
@ -176,7 +176,7 @@ void RivFemPartPartMgr::generatePartGeometry(RivFemPartGeometryGenerator& geoBui
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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_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<size_t>* vxToResultMapping = NULL;
|
||||
const std::vector<size_t>* vxToResultMapping = nullptr;
|
||||
int vxCount = 0;
|
||||
|
||||
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);
|
||||
CVF_ASSERT(view);
|
||||
|
||||
|
@ -205,7 +205,7 @@ RivGeoMechPartMgr* RivGeoMechVizLogic::getUpdatedPartMgr(RivGeoMechPartMgrCache:
|
||||
}
|
||||
else if (pMgrKey.geometryType() == PROPERTY_FILTERED)
|
||||
{
|
||||
RivGeoMechPartMgr* rangefiltered = NULL;
|
||||
RivGeoMechPartMgr* rangefiltered = nullptr;
|
||||
if (m_geomechView->rangeFilterCollection()->hasActiveFilters())
|
||||
{
|
||||
rangefiltered = getUpdatedPartMgr(RivGeoMechPartMgrCache::Key(RANGE_FILTERED, -1));
|
||||
|
@ -535,8 +535,8 @@ void RivGridBoxGenerator::createLegend(EdgeType edge, cvf::Collection<cvf::Part>
|
||||
break;
|
||||
}
|
||||
|
||||
std::vector<double>* displayCoordsTickValues = NULL;
|
||||
std::vector<double>* domainCoordsTickValues = NULL;
|
||||
std::vector<double>* displayCoordsTickValues = nullptr;
|
||||
std::vector<double>* domainCoordsTickValues = nullptr;
|
||||
|
||||
if (axis == X_AXIS)
|
||||
{
|
||||
|
@ -67,9 +67,9 @@ bool RivEclipseIntersectionGrid::useCell(size_t cellIndex) const
|
||||
{
|
||||
const RigCell& cell = m_mainGrid->globalCellArray()[cellIndex];
|
||||
if (m_showInactiveCells)
|
||||
return !(cell.isInvalid() || (cell.subGrid() != NULL));
|
||||
return !(cell.isInvalid() || (cell.subGrid() != nullptr));
|
||||
else
|
||||
return m_activeCellInfo->isActive(cellIndex) && (cell.subGrid() == NULL);
|
||||
return m_activeCellInfo->isActive(cellIndex) && (cell.subGrid() == nullptr);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -43,7 +43,7 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
CellEdgeEffectGenerator::CellEdgeEffectGenerator(const cvf::ScalarMapper* edgeScalarMapper)
|
||||
{
|
||||
CVF_ASSERT(edgeScalarMapper != NULL);
|
||||
CVF_ASSERT(edgeScalarMapper != nullptr);
|
||||
|
||||
m_edgeScalarMapper = edgeScalarMapper;
|
||||
|
||||
|
@ -56,7 +56,7 @@ void RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo(
|
||||
float opacityLevel)
|
||||
{
|
||||
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData();
|
||||
CVF_ASSERT(eclipseCase != NULL);
|
||||
CVF_ASSERT(eclipseCase != nullptr);
|
||||
|
||||
// Create result access objects
|
||||
|
||||
@ -90,7 +90,7 @@ void RivCellEdgeGeometryUtils::addCellEdgeResultsToDrawableGeo(
|
||||
|
||||
double ignoredScalarValue = cellEdgeResultColors->ignoredScalarValue();
|
||||
|
||||
const std::vector<cvf::ubyte>* isWellPipeVisible = NULL;
|
||||
const std::vector<cvf::ubyte>* isWellPipeVisible = nullptr;
|
||||
cvf::cref<cvf::UIntArray> gridCellToWellindexMap;
|
||||
|
||||
if (opacityLevel < 1.0f)
|
||||
@ -200,7 +200,7 @@ void RivCellEdgeGeometryUtils::addTernaryCellEdgeResultsToDrawableGeo(size_t tim
|
||||
cvf::DrawableGeo* geo, size_t gridIndex, float opacityLevel)
|
||||
{
|
||||
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));
|
||||
|
||||
@ -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> resultAccessor = NULL;
|
||||
cvf::ref<RigResultAccessor> resultAccessor = nullptr;
|
||||
|
||||
if (cellResultColors->hasResult())
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::generateSurface()
|
||||
|
||||
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;
|
||||
geo->setFromQuadVertexArray(m_vertices.p());
|
||||
@ -75,7 +75,7 @@ cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::generateSurface()
|
||||
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;
|
||||
geo->setVertexArray(m_vertices.p());
|
||||
@ -93,7 +93,7 @@ cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::createMeshDrawable()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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);
|
||||
|
||||
@ -103,7 +103,7 @@ cvf::ref<cvf::DrawableGeo> RivFaultGeometryGenerator::createOutlineMeshDrawable(
|
||||
cvf::ref<cvf::UIntArray> lineIndices = ee.lineIndices();
|
||||
if (lineIndices->size() == 0)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
cvf::ref<cvf::PrimitiveSetIndexedUInt> prim = new cvf::PrimitiveSetIndexedUInt(cvf::PT_LINES);
|
||||
|
@ -374,7 +374,7 @@ void RivFaultPartMgr::updatePartEffect()
|
||||
m_oppositeFaultFaces->setEffect(geometryOnlyEffect.p());
|
||||
}
|
||||
|
||||
updateNNCColors(0, NULL);
|
||||
updateNNCColors(0, nullptr);
|
||||
|
||||
// Update mesh colors as well, in case of change
|
||||
RiaPreferences* prefs = RiaApplication::instance()->preferences();
|
||||
@ -417,8 +417,8 @@ void RivFaultPartMgr::updatePartEffect()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivFaultPartMgr::createLabelWithAnchorLine(const cvf::Part* part)
|
||||
{
|
||||
m_faultLabelPart = NULL;
|
||||
m_faultLabelLinePart = NULL;
|
||||
m_faultLabelPart = nullptr;
|
||||
m_faultLabelLinePart = nullptr;
|
||||
|
||||
if (!part) return;
|
||||
|
||||
|
@ -189,7 +189,7 @@ void RivGridPartMgr::generatePartGeometry(cvf::StructGridGeometryGenerator& geoB
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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_surfaceGridLines.notNull()) model->addPart(m_surfaceGridLines.p());
|
||||
|
@ -56,7 +56,7 @@ cvf::ref<cvf::DrawableGeo> RivNNCGeometryGenerator::generateSurface()
|
||||
|
||||
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;
|
||||
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());
|
||||
|
||||
bool isVisibilityCalcActive = m_cellVisibility.notNull() && m_grid.notNull();
|
||||
std::vector<RigCell>* allCells = NULL;
|
||||
std::vector<RigCell>* allCells = nullptr;
|
||||
if (isVisibilityCalcActive)
|
||||
{
|
||||
allCells = &(m_grid->mainGrid()->globalCellArray());
|
||||
|
@ -108,7 +108,7 @@ cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::createPipeSurface()
|
||||
{
|
||||
if (m_radius == 0.0)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
updateFilteredPipeCenterCoords();
|
||||
@ -212,9 +212,9 @@ void RivPipeGeometryGenerator::computeCircle(double radius, size_t tesselationCo
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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);
|
||||
|
||||
@ -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_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> 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
|
||||
|
||||
@ -346,7 +346,7 @@ cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateExtrudedCylinder(do
|
||||
|
||||
size_t crossSectionCount = crossSectionVertices.size() / crossSectionNodeCount;
|
||||
|
||||
if (crossSectionCount < 2) return NULL;
|
||||
if (crossSectionCount < 2) return nullptr;
|
||||
|
||||
CVF_ASSERT(crossSectionVertices.size() - crossSectionNodeCount == cylinderSegmentNormals.size());
|
||||
|
||||
|
@ -95,7 +95,7 @@ void RivReservoirFaultsPartMgr::setCellVisibility(cvf::UByteArray* cellVisibilit
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirFaultsPartMgr::appendPartsToModel(cvf::ModelBasicList* model)
|
||||
{
|
||||
CVF_ASSERT(model != NULL);
|
||||
CVF_ASSERT(model != nullptr);
|
||||
|
||||
RimFaultInViewCollection* faultCollection = m_reservoirView->faultCollection();
|
||||
if (!faultCollection) return;
|
||||
@ -243,7 +243,7 @@ void RivReservoirFaultsPartMgr::updateCellEdgeResultColor(size_t timeStepIndex,
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirFaultsPartMgr::appendLabelPartsToModel(cvf::ModelBasicList* model)
|
||||
{
|
||||
CVF_ASSERT(model != NULL);
|
||||
CVF_ASSERT(model != nullptr);
|
||||
if (!m_reservoirView) return;
|
||||
|
||||
RimFaultInViewCollection* faultCollection = m_reservoirView->faultCollection();
|
||||
|
@ -150,8 +150,8 @@ void RivReservoirViewPartMgr::scheduleGeometryRegen(RivCellSetEnum geometryType)
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::clearGeometryCache(RivCellSetEnum geomType)
|
||||
{
|
||||
RigEclipseCaseData* eclipseCase = NULL;
|
||||
if (m_reservoirView != NULL && m_reservoirView->eclipseCase())
|
||||
RigEclipseCaseData* eclipseCase = nullptr;
|
||||
if (m_reservoirView != nullptr && m_reservoirView->eclipseCase())
|
||||
{
|
||||
eclipseCase = m_reservoirView->eclipseCase()->eclipseCaseData();
|
||||
}
|
||||
@ -564,10 +564,10 @@ void RivReservoirViewPartMgr::computeNativeVisibility(cvf::UByteArray* cellVisib
|
||||
bool activeCellsIsVisible,
|
||||
bool mainGridIsVisible)
|
||||
{
|
||||
CVF_ASSERT(cellVisibility != NULL);
|
||||
CVF_ASSERT(grid != NULL);
|
||||
CVF_ASSERT(activeCellInfo != NULL);
|
||||
CVF_ASSERT(cellIsInWellStatuses != NULL);
|
||||
CVF_ASSERT(cellVisibility != nullptr);
|
||||
CVF_ASSERT(grid != nullptr);
|
||||
CVF_ASSERT(activeCellInfo != nullptr);
|
||||
CVF_ASSERT(cellIsInWellStatuses != nullptr);
|
||||
CVF_ASSERT(cellIsInWellStatuses->size() >= 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();
|
||||
#endif
|
||||
|
||||
CVF_ASSERT(cellVisibility != NULL);
|
||||
CVF_ASSERT(grid != NULL);
|
||||
CVF_ASSERT(cellVisibility != nullptr);
|
||||
CVF_ASSERT(grid != nullptr);
|
||||
|
||||
size_t gridCellCount = grid->cellCount();
|
||||
cellVisibility->resize(gridCellCount);
|
||||
@ -660,8 +660,8 @@ void RivReservoirViewPartMgr::computeOverriddenCellVisibility(cvf::UByteArray* c
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivReservoirViewPartMgr::copyByteArray(cvf::UByteArray* destination, const cvf::UByteArray* source )
|
||||
{
|
||||
CVF_ASSERT(destination != NULL);
|
||||
CVF_ASSERT(source != NULL);
|
||||
CVF_ASSERT(destination != nullptr);
|
||||
CVF_ASSERT(source != nullptr);
|
||||
|
||||
if (destination->size() != source->size())
|
||||
{
|
||||
@ -685,11 +685,11 @@ void RivReservoirViewPartMgr::computeRangeVisibility(RivCellSetEnum geometryType
|
||||
const cvf::UByteArray* nativeVisibility,
|
||||
const RimCellRangeFilterCollection* rangeFilterColl)
|
||||
{
|
||||
CVF_ASSERT(cellVisibility != NULL);
|
||||
CVF_ASSERT(nativeVisibility != NULL);
|
||||
CVF_ASSERT(rangeFilterColl != NULL);
|
||||
CVF_ASSERT(cellVisibility != nullptr);
|
||||
CVF_ASSERT(nativeVisibility != nullptr);
|
||||
CVF_ASSERT(rangeFilterColl != nullptr);
|
||||
|
||||
CVF_ASSERT(grid != NULL);
|
||||
CVF_ASSERT(grid != nullptr);
|
||||
CVF_ASSERT(nativeVisibility->size() == grid->cellCount());
|
||||
|
||||
// Initialize range filter with native visibility
|
||||
@ -701,7 +701,7 @@ void RivReservoirViewPartMgr::computeRangeVisibility(RivCellSetEnum geometryType
|
||||
cvf::CellRangeFilter gridCellRangeFilter;
|
||||
rangeFilterColl->compoundCellRangeFilter(&gridCellRangeFilter, grid->gridIndex());
|
||||
|
||||
const RigLocalGrid* lgr = NULL;
|
||||
const RigLocalGrid* lgr = nullptr;
|
||||
cvf::ref<cvf::UByteArray> parentGridVisibilities;
|
||||
|
||||
if (!grid->isMainGrid())
|
||||
@ -741,7 +741,7 @@ void RivReservoirViewPartMgr::computeRangeVisibility(RivCellSetEnum geometryType
|
||||
size_t mainGridJ;
|
||||
size_t mainGridK;
|
||||
|
||||
bool isInSubGridArea = cell.subGrid() != NULL;
|
||||
bool isInSubGridArea = cell.subGrid() != nullptr;
|
||||
grid->ijkFromCellIndex(cellIndex, &mainGridI, &mainGridJ, &mainGridK);
|
||||
|
||||
bool nativeRangeVisibility = false;
|
||||
@ -769,9 +769,9 @@ void RivReservoirViewPartMgr::computeRangeVisibility(RivCellSetEnum geometryType
|
||||
void RivReservoirViewPartMgr::computePropertyVisibility(cvf::UByteArray* cellVisibility, const RigGridBase* grid, size_t timeStepIndex,
|
||||
const cvf::UByteArray* rangeFilterVisibility, RimEclipsePropertyFilterCollection* propFilterColl)
|
||||
{
|
||||
CVF_ASSERT(cellVisibility != NULL);
|
||||
CVF_ASSERT(rangeFilterVisibility != NULL);
|
||||
CVF_ASSERT(propFilterColl != NULL);
|
||||
CVF_ASSERT(cellVisibility != nullptr);
|
||||
CVF_ASSERT(rangeFilterVisibility != nullptr);
|
||||
CVF_ASSERT(propFilterColl != nullptr);
|
||||
|
||||
CVF_ASSERT(grid->cellCount() > 0);
|
||||
CVF_ASSERT(rangeFilterVisibility->size() == grid->cellCount());
|
||||
|
@ -224,10 +224,10 @@ void RivSimWellPipesPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLi
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RivSimWellPipesPartMgr::updatePipeResultColor(size_t frameIndex)
|
||||
{
|
||||
if (m_rimWell == NULL) return;
|
||||
if (m_rimWell == nullptr) return;
|
||||
|
||||
RigSimWellData* simWellData = m_rimWell->simWellData();
|
||||
if (simWellData == NULL) return;
|
||||
if (simWellData == nullptr) return;
|
||||
|
||||
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)
|
||||
{
|
||||
// we need a faster lookup, I guess
|
||||
const RigWellResultPoint* wResCell = NULL;
|
||||
const RigWellResultPoint* wResCell = nullptr;
|
||||
|
||||
if (cellIds[wcIdx].isCell())
|
||||
{
|
||||
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.
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ RivSingleCellPartGenerator::RivSingleCellPartGenerator(RigEclipseCaseData* rigCa
|
||||
: m_rigCaseData(rigCaseData),
|
||||
m_gridIndex(gridIndex),
|
||||
m_cellIndex(cellIndex),
|
||||
m_geoMechCase(NULL)
|
||||
m_geoMechCase(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ RivSingleCellPartGenerator::RivSingleCellPartGenerator(RimGeoMechCase* rimGeoMec
|
||||
: m_geoMechCase(rimGeoMechCase),
|
||||
m_gridIndex(gridIndex),
|
||||
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 NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -241,9 +241,9 @@ caf::EffectGenerator* RivTernaryScalarMapperEffectGenerator::copy() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
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->width() == texImg2->width()
|
||||
&& texImg1->width() > 0 && texImg1->height() > 0
|
||||
|
@ -81,7 +81,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
|
||||
RimEclipseCellColors* cellResultColors,
|
||||
const RivTernaryScalarMapper* ternaryColorMapper,
|
||||
size_t timeStepIndex)
|
||||
: m_quadMapper(NULL)
|
||||
: m_quadMapper(nullptr)
|
||||
{
|
||||
RigEclipseCaseData* eclipseCase = cellResultColors->reservoirView()->eclipseCase()->eclipseCaseData();
|
||||
|
||||
@ -100,7 +100,7 @@ RivTernaryTextureCoordsCreator::RivTernaryTextureCoordsCreator(
|
||||
m_resultAccessor->setTernaryResultAccessors(soil.p(), sgas.p(), swat.p());
|
||||
|
||||
// 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());
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ void RimFishboneWellPathCollection::appendCompletion(RimFishboneWellPath* comple
|
||||
|
||||
uiCapability()->setUiHidden(!m_wellPaths.empty());
|
||||
|
||||
RimProject* project = NULL;
|
||||
RimProject* project = nullptr;
|
||||
firstAncestorOrThisOfTypeAsserted(project);
|
||||
if (project)
|
||||
{
|
||||
|
@ -494,7 +494,7 @@ QString Rim3dOverlayInfoConfig::caseInfoText(RimGeoMechView* geoMechView)
|
||||
{
|
||||
RimGeoMechCase* geoMechCase = geoMechView->geoMechCase();
|
||||
RigGeoMechCaseData* caseData = geoMechCase ? geoMechCase->geoMechData() : nullptr;
|
||||
RigFemPartCollection* femParts = caseData ? caseData->femParts() : NULL;
|
||||
RigFemPartCollection* femParts = caseData ? caseData->femParts() : nullptr;
|
||||
|
||||
if (femParts)
|
||||
{
|
||||
|
@ -159,7 +159,7 @@ QWidget* Rim3dView::createViewWidget(QWidget* mainWindowParent)
|
||||
QGLFormat glFormat;
|
||||
glFormat.setDirectRendering(RiaApplication::instance()->useShaders());
|
||||
|
||||
m_viewer = new RiuViewer(glFormat, NULL);
|
||||
m_viewer = new RiuViewer(glFormat, nullptr);
|
||||
m_viewer->setOwnerReservoirView(this);
|
||||
|
||||
cvf::String xLabel;
|
||||
|
@ -66,5 +66,5 @@ RimEclipseCase* RimCaseCollection::findByDescription(const QString& caseDescript
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* c
|
||||
updateIconState();
|
||||
uiCapability()->updateConnectedEditors();
|
||||
|
||||
updateDisplayModeNotifyManagedViews(NULL);
|
||||
updateDisplayModeNotifyManagedViews(nullptr);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -110,7 +110,7 @@ void RimCellRangeFilterCollection::fieldChangedByUi(const caf::PdmFieldHandle* c
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimCellRangeFilterCollection::updateDisplayModeNotifyManagedViews(RimCellRangeFilter* changedRangeFilter)
|
||||
{
|
||||
Rim3dView* view = NULL;
|
||||
Rim3dView* view = nullptr;
|
||||
firstAncestorOrThisOfType(view);
|
||||
if (!view) return;
|
||||
|
||||
@ -175,7 +175,7 @@ bool RimCellRangeFilterCollection::hasActiveIncludeFilters() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Rim3dView* RimCellRangeFilterCollection::baseView() const
|
||||
{
|
||||
Rim3dView* rimView = NULL;
|
||||
Rim3dView* rimView = nullptr;
|
||||
firstAncestorOrThisOfType(rimView);
|
||||
|
||||
return rimView;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -109,7 +109,7 @@ RimEclipseCase::RimEclipseCase()
|
||||
m_fractureModelResults.uiCapability()->setUiHidden(true);
|
||||
m_fractureModelResults.uiCapability()->setUiTreeChildrenHidden(true);
|
||||
|
||||
this->setReservoirData( NULL );
|
||||
this->setReservoirData( nullptr );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -483,8 +483,8 @@ void RimEclipseCase::setReservoirData(RigEclipseCaseData* eclipseCase)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_fractureModelResults()->setCellResults(NULL);
|
||||
m_matrixModelResults()->setCellResults(NULL);
|
||||
m_fractureModelResults()->setCellResults(nullptr);
|
||||
m_matrixModelResults()->setCellResults(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ RimEclipseCellColors::RimEclipseCellColors()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseCellColors::~RimEclipseCellColors()
|
||||
{
|
||||
CVF_ASSERT(obsoleteField_legendConfig() == NULL);
|
||||
CVF_ASSERT(obsoleteField_legendConfig() == nullptr);
|
||||
|
||||
m_legendConfigData.deleteAllChildObjects();
|
||||
|
||||
@ -171,7 +171,7 @@ void RimEclipseCellColors::initAfterRead()
|
||||
RimLegendConfig* obsoleteLegend = obsoleteField_legendConfig();
|
||||
|
||||
// set to NULL before pushing into container
|
||||
obsoleteField_legendConfig = NULL;
|
||||
obsoleteField_legendConfig = nullptr;
|
||||
|
||||
m_legendConfigData.push_back(obsoleteLegend);
|
||||
m_legendConfigPtrField = obsoleteLegend;
|
||||
|
@ -56,7 +56,7 @@ RimEclipseFaultColors::RimEclipseFaultColors()
|
||||
RimEclipseFaultColors::~RimEclipseFaultColors()
|
||||
{
|
||||
delete m_customFaultResultColors;
|
||||
m_customFaultResultColors = NULL;
|
||||
m_customFaultResultColors = nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -103,7 +103,7 @@ bool RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
|
||||
return true;
|
||||
}
|
||||
|
||||
if (this->eclipseCaseData() == NULL)
|
||||
if (this->eclipseCaseData() == nullptr)
|
||||
{
|
||||
this->setReservoirData(new RigEclipseCaseData(this));
|
||||
}
|
||||
@ -181,7 +181,7 @@ bool RimEclipseInputCase::openDataFileSet(const QStringList& fileNames)
|
||||
bool RimEclipseInputCase::openEclipseGridFile()
|
||||
{
|
||||
// Early exit if reservoir data is created
|
||||
if (this->eclipseCaseData() == NULL)
|
||||
if (this->eclipseCaseData() == nullptr)
|
||||
{
|
||||
cvf::ref<RifReaderInterface> readerInterface;
|
||||
|
||||
|
@ -76,6 +76,6 @@ RimEclipseInputProperty * RimEclipseInputPropertyCollection::findInputProperty(Q
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ RimEclipsePropertyFilterCollection::~RimEclipsePropertyFilterCollection()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimEclipseView* RimEclipsePropertyFilterCollection::reservoirView()
|
||||
{
|
||||
RimEclipseView* eclipseView = NULL;
|
||||
RimEclipseView* eclipseView = nullptr;
|
||||
firstAncestorOrThisOfType(eclipseView);
|
||||
|
||||
return eclipseView;
|
||||
@ -143,7 +143,7 @@ void RimEclipsePropertyFilterCollection::updateIconState()
|
||||
{
|
||||
bool activeIcon = true;
|
||||
|
||||
RimEclipseView* view = NULL;
|
||||
RimEclipseView* view = nullptr;
|
||||
this->firstAncestorOrThisOfType(view);
|
||||
if (view)
|
||||
{
|
||||
|
@ -152,7 +152,7 @@ bool RimEclipseResultCase::importGridAndResultMetaData(bool showTimeStepFilter)
|
||||
|
||||
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));
|
||||
|
||||
if (propertyDialog.exec() != QDialog::Accepted)
|
||||
@ -387,7 +387,7 @@ cvf::ref<RifReaderInterface> RimEclipseResultCase::createMockModel(QString model
|
||||
RimMockModelSettings 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)
|
||||
{
|
||||
QApplication::restoreOverrideCursor();
|
||||
|
@ -201,7 +201,7 @@ void RimEclipseStatisticsCase::populateResultSelectionAfterLoadingGrid()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseStatisticsCase::computeStatistics()
|
||||
{
|
||||
if (this->eclipseCaseData() == NULL)
|
||||
if (this->eclipseCaseData() == nullptr)
|
||||
{
|
||||
openEclipseGridFile();
|
||||
}
|
||||
@ -336,7 +336,7 @@ RimIdenticalGridCaseGroup* RimEclipseStatisticsCase::caseGroup()
|
||||
return parentCollection->parentCaseGroup();
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user