Refactor CSV parser: modernize parser to use std::expected.

This commit is contained in:
Kristian Bendiksen committed 2025-10-17 07:52:42 +02:00
1 parent db586cd99a
commit d137281066
9 files changed
+165 -175

No files matched your search

@@ -131,7 +131,7 @@ std::vector<std::vector<cvf::Vec3d>> RifPolygonReader::parseText( const QString&
//--------------------------------------------------------------------------------------------------
std::vector<std::pair<int, std::vector<cvf::Vec3d>>> RifPolygonReader::parseTextCsv( const QString& content, QString* errorMessage )
{
RifCsvUserDataPastedTextParser parser( content, errorMessage );
RifCsvUserDataPastedTextParser parser( content );
RifAsciiDataParseOptions parseOptions;
parseOptions.cellSeparator = ",";
@@ -139,7 +139,8 @@ std::vector<std::pair<int, std::vector<cvf::Vec3d>>> RifPolygonReader::parseText
std::vector<std::pair<QString, std::vector<double>>> readValues;
if ( parser.parse( parseOptions ) )
auto parseResult = parser.parse( parseOptions );
if ( parseResult )
{
for ( auto s : parser.tableData().columnInfos() )
{