From fea3df93516a3d7b1b5f0cbe05da6fd4de8599a7 Mon Sep 17 00:00:00 2001 From: Magne Sjaastad Date: Thu, 17 Oct 2024 09:58:53 +0200 Subject: [PATCH] Handling of two levels of network vectors --- .../RifEclipseSummaryAddress.cpp | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/ApplicationLibCode/FileInterface/RifEclipseSummaryAddress.cpp b/ApplicationLibCode/FileInterface/RifEclipseSummaryAddress.cpp index 1f3dcc0a34..88549f1416 100644 --- a/ApplicationLibCode/FileInterface/RifEclipseSummaryAddress.cpp +++ b/ApplicationLibCode/FileInterface/RifEclipseSummaryAddress.cpp @@ -1034,8 +1034,24 @@ RifEclipseSummaryAddress RifEclipseSummaryAddress::fromTokens( const std::vector break; case SummaryCategory::SUMMARY_NETWORK: - return networkAddress( vectorName, token1 ); - break; + { + auto aggregated = token1; + if ( !token2.empty() ) + { + bool useToken2 = true; + if ( useToken2 ) + { + aggregated = token2; + } + else + { + aggregated += ":"; + aggregated += token2; + } + } + return networkAddress( vectorName, aggregated ); + } + break; case SummaryCategory::SUMMARY_MISC: return miscAddress( vectorName );