Fix some signed/unsigned compare issues

This commit is contained in:
Magne Sjaastad 2022-11-10 07:17:58 +01:00
parent 3a99c039be
commit 4fea00afbf
2 changed files with 9 additions and 10 deletions

View File

@ -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<QString, QString> RifThermalFractureReader::parseNameAndUnit( const QS
QString unit = match.captured( 2 );
return std::make_pair( name, unit );
}
else
{
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;
}

View File

@ -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<int>( def->numNodes() ); nodeIndex++ )
{
for ( size_t timeStepIndex = 0; timeStepIndex < def->numTimeSteps(); timeStepIndex++ )
for ( int timeStepIndex = 0; timeStepIndex < static_cast<int>( 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<int>( def->numNodes() ); nodeIndex++ )
{
for ( size_t timeStepIndex = 0; timeStepIndex < def->numTimeSteps(); timeStepIndex++ )
for ( int timeStepIndex = 0; timeStepIndex < static_cast<int>( def->numTimeSteps() ); timeStepIndex++ )
{
double leakoffPressureDrop =
def->getPropertyValue( leakoffPressureDropIndex, nodeIndex, timeStepIndex );