mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Improve interface for string operations
Trim incoming string before converting to number Remove use of std::strtod and std::stoi Use std::string_view instead of std::string when possible
This commit is contained in:
@@ -89,9 +89,11 @@ void RifKeywordVectorParser::parseData( const QString& data )
|
||||
keywordBasedVector.header = RifEclipseUserDataParserTools::headerReader( streamData, line );
|
||||
if ( keywordBasedVector.header.empty() ) break;
|
||||
|
||||
double value = 0.0;
|
||||
while ( RifEclipseUserDataParserTools::isANumber( line ) )
|
||||
{
|
||||
keywordBasedVector.values.push_back( RiaStdStringTools::toDouble( line ) );
|
||||
RiaStdStringTools::toDouble( line, value );
|
||||
keywordBasedVector.values.push_back( value );
|
||||
std::getline( streamData, line );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user