mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8833 Import Of Observed FMU Data: Improve parsing of text files
This commit is contained in:
parent
853b4a26d5
commit
571011c2bd
@ -418,15 +418,16 @@ RifReaderFmuRft::WellObservationMap RifReaderFmuRft::loadWellDates( QDir& dir, Q
|
|||||||
return WellObservationMap();
|
return WellObservationMap();
|
||||||
}
|
}
|
||||||
QTextStream fileStream( &wellDateFile );
|
QTextStream fileStream( &wellDateFile );
|
||||||
while ( true )
|
while ( !fileStream.atEnd() )
|
||||||
{
|
{
|
||||||
QString line = fileStream.readLine();
|
QString line = fileStream.readLine();
|
||||||
if ( line.isNull() )
|
|
||||||
|
line = line.simplified();
|
||||||
|
if ( line.isNull() || line.isEmpty() )
|
||||||
{
|
{
|
||||||
break;
|
continue;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
QTextStream lineStream( &line );
|
QTextStream lineStream( &line );
|
||||||
|
|
||||||
QString wellName;
|
QString wellName;
|
||||||
@ -445,7 +446,6 @@ RifReaderFmuRft::WellObservationMap RifReaderFmuRft::loadWellDates( QDir& dir, Q
|
|||||||
validObservations.insert( std::make_pair( wellName, observationSet ) );
|
validObservations.insert( std::make_pair( wellName, observationSet ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return validObservations;
|
return validObservations;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user