diff --git a/ApplicationLibCode/FileInterface/RifThermalFractureReader.cpp b/ApplicationLibCode/FileInterface/RifThermalFractureReader.cpp index 7e2e15b54e..1299fccacb 100644 --- a/ApplicationLibCode/FileInterface/RifThermalFractureReader.cpp +++ b/ApplicationLibCode/FileInterface/RifThermalFractureReader.cpp @@ -177,6 +177,7 @@ QDateTime RifThermalFractureReader::parseDateTime( const QString& dateString ) { QString dateFormat = "dd.MM.yyyy hh:mm:ss"; QDateTime dateTime = QDateTime::fromString( dateString, dateFormat ); + // Sometimes the datetime field is missing time if ( !dateTime.isValid() ) { @@ -240,10 +241,8 @@ std::pair RifThermalFractureReader::parseNameAndUnit( const QS QString unit = match.captured( 2 ); return std::make_pair( name, unit ); } - else - { - return std::make_pair( "", "" ); - } + + return std::make_pair( "", "" ); } //-------------------------------------------------------------------------------------------------- @@ -264,8 +263,8 @@ RiaDefines::EclipseUnitSystem QString unit = res->second; if ( unit == RiaDefines::getExpectedThermalFractureUnit( targetName, RiaDefines::EclipseUnitSystem::UNITS_METRIC ) ) return RiaDefines::EclipseUnitSystem::UNITS_METRIC; - else if ( unit == - RiaDefines::getExpectedThermalFractureUnit( targetName, RiaDefines::EclipseUnitSystem::UNITS_FIELD ) ) + + if ( unit == RiaDefines::getExpectedThermalFractureUnit( targetName, RiaDefines::EclipseUnitSystem::UNITS_FIELD ) ) return RiaDefines::EclipseUnitSystem::UNITS_FIELD; } diff --git a/ApplicationLibCode/ProjectDataModel/Completions/RimThermalFractureTemplate.cpp b/ApplicationLibCode/ProjectDataModel/Completions/RimThermalFractureTemplate.cpp index bc524f3a7b..1e64250d38 100644 --- a/ApplicationLibCode/ProjectDataModel/Completions/RimThermalFractureTemplate.cpp +++ b/ApplicationLibCode/ProjectDataModel/Completions/RimThermalFractureTemplate.cpp @@ -176,9 +176,9 @@ void RimThermalFractureTemplate::loadDataAndUpdate() int injectivityFactorIndex = def->getPropertyIndex( injectivityValueTag ); - for ( size_t nodeIndex = 0; nodeIndex < def->numNodes(); nodeIndex++ ) + for ( int nodeIndex = 0; nodeIndex < static_cast( def->numNodes() ); nodeIndex++ ) { - for ( size_t timeStepIndex = 0; timeStepIndex < def->numTimeSteps(); timeStepIndex++ ) + for ( int timeStepIndex = 0; timeStepIndex < static_cast( def->numTimeSteps() ); timeStepIndex++ ) { double leakoffPressureDrop = def->getPropertyValue( leakoffPressureDropIndex, nodeIndex, timeStepIndex ); @@ -201,9 +201,9 @@ void RimThermalFractureTemplate::loadDataAndUpdate() int filterCakeMobilityIndex = def->getPropertyIndex( filterCakeMobilityValueTag ); - for ( size_t nodeIndex = 0; nodeIndex < def->numNodes(); nodeIndex++ ) + for ( int nodeIndex = 0; nodeIndex < static_cast( def->numNodes() ); nodeIndex++ ) { - for ( size_t timeStepIndex = 0; timeStepIndex < def->numTimeSteps(); timeStepIndex++ ) + for ( int timeStepIndex = 0; timeStepIndex < static_cast( def->numTimeSteps() ); timeStepIndex++ ) { double leakoffPressureDrop = def->getPropertyValue( leakoffPressureDropIndex, nodeIndex, timeStepIndex );