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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user