mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(clang-tidy) : modernize-use-nullptr
This commit is contained in:
@@ -365,7 +365,7 @@ void RigFemPart::findIntersectingCells(const cvf::BoundingBox& inputBB, std::vec
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_elementSearchTree = new cvf::BoundingBoxTree;
|
m_elementSearchTree = new cvf::BoundingBoxTree;
|
||||||
m_elementSearchTree->buildTreeFromBoundingBoxes(cellBoundingBoxes, NULL);
|
m_elementSearchTree->buildTreeFromBoundingBoxes(cellBoundingBoxes, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_elementSearchTree->findIntersections(inputBB, elementIndices);
|
m_elementSearchTree->findIntersections(inputBB, elementIndices);
|
||||||
|
|||||||
@@ -1919,7 +1919,7 @@ RigFemScalarResultFrames* RigFemPartResultsCollection::calculateDerivedResult(in
|
|||||||
|
|
||||||
return resFrames;
|
return resFrames;
|
||||||
}
|
}
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -128,5 +128,5 @@ RimWellPathEntry* RimOilFieldEntry::find(const QString& name, RimWellPathEntry::
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,8 +115,8 @@ void RimWellPathImport::updateRegions(const QStringList& regionStrings, const QS
|
|||||||
|
|
||||||
for (int i = 0; i < regionStrings.size(); i++)
|
for (int i = 0; i < regionStrings.size(); i++)
|
||||||
{
|
{
|
||||||
RimOilRegionEntry* oilRegionEntry = NULL;
|
RimOilRegionEntry* oilRegionEntry = nullptr;
|
||||||
RimOilFieldEntry* oilFieldEntry = NULL;
|
RimOilFieldEntry* oilFieldEntry = nullptr;
|
||||||
|
|
||||||
for (size_t regionIdx = 0; regionIdx < this->regions.size(); regionIdx++)
|
for (size_t regionIdx = 0; regionIdx < this->regions.size(); regionIdx++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ void RiuWellImportWizard::issueHttpRequestToFile(QString completeUrlText, QStrin
|
|||||||
tr("Unable to save the file %1: %2.")
|
tr("Unable to save the file %1: %2.")
|
||||||
.arg(destinationFileName).arg(m_file->errorString()));
|
.arg(destinationFileName).arg(m_file->errorString()));
|
||||||
delete m_file;
|
delete m_file;
|
||||||
m_file = 0;
|
m_file = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ void RiuWellImportWizard::httpFinished()
|
|||||||
m_file->close();
|
m_file->close();
|
||||||
m_file->remove();
|
m_file->remove();
|
||||||
delete m_file;
|
delete m_file;
|
||||||
m_file = 0;
|
m_file = nullptr;
|
||||||
}
|
}
|
||||||
m_reply->deleteLater();
|
m_reply->deleteLater();
|
||||||
m_myProgressDialog->hide();
|
m_myProgressDialog->hide();
|
||||||
@@ -231,9 +231,9 @@ void RiuWellImportWizard::httpFinished()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_reply->deleteLater();
|
m_reply->deleteLater();
|
||||||
m_reply = 0;
|
m_reply = nullptr;
|
||||||
delete m_file;
|
delete m_file;
|
||||||
m_file = 0;
|
m_file = nullptr;
|
||||||
|
|
||||||
if (m_currentDownloadState == DOWNLOAD_WELLS || m_currentDownloadState == DOWNLOAD_WELL_PATH)
|
if (m_currentDownloadState == DOWNLOAD_WELLS || m_currentDownloadState == DOWNLOAD_WELL_PATH)
|
||||||
{
|
{
|
||||||
@@ -446,7 +446,7 @@ void RiuWellImportWizard::downloadWellPaths()
|
|||||||
{
|
{
|
||||||
WellSelectionPage* wellSelectionPage = dynamic_cast<WellSelectionPage*>(page(m_wellSelectionPageId));
|
WellSelectionPage* wellSelectionPage = dynamic_cast<WellSelectionPage*>(page(m_wellSelectionPageId));
|
||||||
std::vector<DownloadEntity> downloadEntities;
|
std::vector<DownloadEntity> downloadEntities;
|
||||||
wellSelectionPage->selectedWellPathEntries(downloadEntities, NULL);
|
wellSelectionPage->selectedWellPathEntries(downloadEntities, nullptr);
|
||||||
|
|
||||||
for (size_t i = 0; i < downloadEntities.size(); i++)
|
for (size_t i = 0; i < downloadEntities.size(); i++)
|
||||||
{
|
{
|
||||||
@@ -537,7 +537,7 @@ QStringList RiuWellImportWizard::absoluteFilePathsToWellPaths() const
|
|||||||
|
|
||||||
WellSelectionPage* wellSelectionPage = dynamic_cast<WellSelectionPage*>(page(m_wellSelectionPageId));
|
WellSelectionPage* wellSelectionPage = dynamic_cast<WellSelectionPage*>(page(m_wellSelectionPageId));
|
||||||
std::vector<DownloadEntity> downloadEntities;
|
std::vector<DownloadEntity> downloadEntities;
|
||||||
wellSelectionPage->selectedWellPathEntries(downloadEntities, NULL);
|
wellSelectionPage->selectedWellPathEntries(downloadEntities, nullptr);
|
||||||
|
|
||||||
for (size_t i = 0; i < downloadEntities.size(); i++)
|
for (size_t i = 0; i < downloadEntities.size(); i++)
|
||||||
{
|
{
|
||||||
@@ -787,7 +787,7 @@ void FieldSelectionPage::initializePage()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
FieldSelectionPage::~FieldSelectionPage()
|
FieldSelectionPage::~FieldSelectionPage()
|
||||||
{
|
{
|
||||||
m_propertyView->showProperties(NULL);
|
m_propertyView->showProperties(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -915,7 +915,7 @@ WellSelectionPage::~WellSelectionPage()
|
|||||||
{
|
{
|
||||||
if (m_wellSelectionTreeView)
|
if (m_wellSelectionTreeView)
|
||||||
{
|
{
|
||||||
m_wellSelectionTreeView->setPdmItem(NULL);
|
m_wellSelectionTreeView->setPdmItem(nullptr);
|
||||||
}
|
}
|
||||||
delete m_regionsWithVisibleWells;
|
delete m_regionsWithVisibleWells;
|
||||||
}
|
}
|
||||||
@@ -926,7 +926,7 @@ WellSelectionPage::~WellSelectionPage()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void WellSelectionPage::selectedWellPathEntries(std::vector<DownloadEntity>& downloadEntities, caf::PdmObjectHandle* objHandle)
|
void WellSelectionPage::selectedWellPathEntries(std::vector<DownloadEntity>& downloadEntities, caf::PdmObjectHandle* objHandle)
|
||||||
{
|
{
|
||||||
if (objHandle == NULL)
|
if (objHandle == nullptr)
|
||||||
{
|
{
|
||||||
objHandle = m_regionsWithVisibleWells;
|
objHandle = m_regionsWithVisibleWells;
|
||||||
}
|
}
|
||||||
@@ -968,8 +968,8 @@ void WellSelectionPage::selectedWellPathEntries(std::vector<DownloadEntity>& dow
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool lessByDescription(const caf::PdmPointer<caf::PdmObjectHandle>& obj1, const caf::PdmPointer<caf::PdmObjectHandle>& obj2)
|
bool lessByDescription(const caf::PdmPointer<caf::PdmObjectHandle>& obj1, const caf::PdmPointer<caf::PdmObjectHandle>& obj2)
|
||||||
{
|
{
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle1 = NULL;
|
caf::PdmUiFieldHandle* uiFieldHandle1 = nullptr;
|
||||||
caf::PdmUiFieldHandle* uiFieldHandle2 = NULL;
|
caf::PdmUiFieldHandle* uiFieldHandle2 = nullptr;
|
||||||
|
|
||||||
if (obj1.notNull() && obj1->uiCapability() && obj1->uiCapability()->userDescriptionField())
|
if (obj1.notNull() && obj1->uiCapability() && obj1->uiCapability()->userDescriptionField())
|
||||||
{
|
{
|
||||||
@@ -1053,7 +1053,7 @@ void WellSummaryPage::updateSummaryPage()
|
|||||||
RiuWellImportWizard* wiz = dynamic_cast<RiuWellImportWizard*>(wizard());
|
RiuWellImportWizard* wiz = dynamic_cast<RiuWellImportWizard*>(wizard());
|
||||||
WellSelectionPage* wellSelectionPage = dynamic_cast<WellSelectionPage*>(wiz->page(wiz->wellSelectionPageId()));
|
WellSelectionPage* wellSelectionPage = dynamic_cast<WellSelectionPage*>(wiz->page(wiz->wellSelectionPageId()));
|
||||||
std::vector<DownloadEntity> downloadEntities;
|
std::vector<DownloadEntity> downloadEntities;
|
||||||
wellSelectionPage->selectedWellPathEntries(downloadEntities, NULL);
|
wellSelectionPage->selectedWellPathEntries(downloadEntities, nullptr);
|
||||||
|
|
||||||
for (size_t i = 0; i < downloadEntities.size(); i++)
|
for (size_t i = 0; i < downloadEntities.size(); i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class AuthenticationPage : public QWizardPage
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AuthenticationPage(const QString& webServiceAddress, QWidget *parent = 0);
|
AuthenticationPage(const QString& webServiceAddress, QWidget *parent = nullptr);
|
||||||
|
|
||||||
virtual void initializePage();
|
virtual void initializePage();
|
||||||
};
|
};
|
||||||
@@ -71,7 +71,7 @@ class FieldSelectionPage : public QWizardPage
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
FieldSelectionPage(RimWellPathImport* wellPathImport, QWidget* parent = 0);
|
FieldSelectionPage(RimWellPathImport* wellPathImport, QWidget* parent = nullptr);
|
||||||
~FieldSelectionPage();
|
~FieldSelectionPage();
|
||||||
|
|
||||||
virtual void initializePage();
|
virtual void initializePage();
|
||||||
@@ -127,7 +127,7 @@ class WellSelectionPage : public QWizardPage
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WellSelectionPage(RimWellPathImport* wellPathImport, QWidget* parent = 0);
|
WellSelectionPage(RimWellPathImport* wellPathImport, QWidget* parent = nullptr);
|
||||||
~WellSelectionPage();
|
~WellSelectionPage();
|
||||||
|
|
||||||
virtual void initializePage();
|
virtual void initializePage();
|
||||||
@@ -153,7 +153,7 @@ class WellSummaryPage : public QWizardPage
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WellSummaryPage(RimWellPathImport* wellPathImport, QWidget* parent = 0);
|
WellSummaryPage(RimWellPathImport* wellPathImport, QWidget* parent = nullptr);
|
||||||
|
|
||||||
virtual void initializePage();
|
virtual void initializePage();
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ public:
|
|||||||
enum DownloadState{ DOWNLOAD_FIELDS, DOWNLOAD_WELLS, DOWNLOAD_WELL_PATH, DOWNLOAD_UNDEFINED};
|
enum DownloadState{ DOWNLOAD_FIELDS, DOWNLOAD_WELLS, DOWNLOAD_WELL_PATH, DOWNLOAD_UNDEFINED};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
RiuWellImportWizard(const QString& webServiceAddress, const QString& downloadFolder, RimWellPathImport* wellPathImportObject, QWidget *parent = 0);
|
RiuWellImportWizard(const QString& webServiceAddress, const QString& downloadFolder, RimWellPathImport* wellPathImportObject, QWidget *parent = nullptr);
|
||||||
~RiuWellImportWizard();
|
~RiuWellImportWizard();
|
||||||
|
|
||||||
void setCredentials(const QString& username, const QString& password);
|
void setCredentials(const QString& username, const QString& password);
|
||||||
|
|||||||
Reference in New Issue
Block a user