Revert "Early return if data already is available"

This reverts commit 274d4fc0db.
This commit is contained in:
Magne Sjaastad
2024-04-22 09:07:22 +02:00
parent 16be653826
commit c17e5237ca

View File

@@ -1587,13 +1587,6 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultByResultTypeOrder( con
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex ) size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const RigEclipseResultAddress& resVarAddr, size_t timeStepIndex )
{ {
size_t scalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T )
{
return cvf::UNDEFINED_SIZE_T;
}
if ( isDataPresent( scalarResultIndex ) ) return scalarResultIndex;
RiaDefines::ResultCatType type = resVarAddr.resultCatType(); RiaDefines::ResultCatType type = resVarAddr.resultCatType();
QString resultName = resVarAddr.resultName(); QString resultName = resVarAddr.resultName();
@@ -1622,6 +1615,7 @@ size_t RigCaseCellResultsData::findOrLoadKnownScalarResultForTimeStep( const Rig
return completionTypeScalarResultIndex; return completionTypeScalarResultIndex;
} }
size_t scalarResultIndex = findScalarResultIndexFromAddress( resVarAddr );
if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T ) return cvf::UNDEFINED_SIZE_T; if ( scalarResultIndex == cvf::UNDEFINED_SIZE_T ) return cvf::UNDEFINED_SIZE_T;
if ( type == RiaDefines::ResultCatType::GENERATED ) if ( type == RiaDefines::ResultCatType::GENERATED )