mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
This commit is contained in:
parent
08741150c7
commit
2b1e2bb157
@ -547,6 +547,23 @@ public:
|
||||
|
||||
// Make sure the size of the retreiving container is correct.
|
||||
// If it is, this is noops
|
||||
{
|
||||
size_t maxRequestedTimeStepIdx = cvf::UNDEFINED_SIZE_T;
|
||||
for (size_t tIdx = 0; tIdx < m_timeStepCountToRead; ++tIdx)
|
||||
{
|
||||
size_t tsId = m_requestedTimesteps[tIdx];
|
||||
if (maxRequestedTimeStepIdx == cvf::UNDEFINED_SIZE_T || tsId > maxRequestedTimeStepIdx)
|
||||
{
|
||||
maxRequestedTimeStepIdx = tsId;
|
||||
}
|
||||
}
|
||||
|
||||
if (maxRequestedTimeStepIdx != cvf::UNDEFINED_SIZE_T
|
||||
&& m_scalarResultsToAdd->size() <= maxRequestedTimeStepIdx)
|
||||
{
|
||||
m_scalarResultsToAdd->resize(maxRequestedTimeStepIdx + 1);
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t tIdx = 0; tIdx < m_timeStepCountToRead; ++tIdx)
|
||||
{
|
||||
@ -909,6 +926,25 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
// Resize the timestep container
|
||||
{
|
||||
size_t maxRequestedTimeStepIdx = cvf::UNDEFINED_SIZE_T;
|
||||
for (size_t tIdx = 0; tIdx < m_timeStepCountToRead; ++tIdx)
|
||||
{
|
||||
size_t tsId = m_requestedTimesteps[tIdx];
|
||||
if (maxRequestedTimeStepIdx == cvf::UNDEFINED_SIZE_T || tsId > maxRequestedTimeStepIdx)
|
||||
{
|
||||
maxRequestedTimeStepIdx = tsId;
|
||||
}
|
||||
}
|
||||
|
||||
if (maxRequestedTimeStepIdx != cvf::UNDEFINED_SIZE_T
|
||||
&& m_scalarResultsToAdd->size() <= maxRequestedTimeStepIdx)
|
||||
{
|
||||
m_scalarResultsToAdd->resize(maxRequestedTimeStepIdx + 1);
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t tIdx = 0; tIdx < m_timeStepCountToRead; ++tIdx)
|
||||
{
|
||||
size_t tsId = m_requestedTimesteps[tIdx];
|
||||
|
Loading…
Reference in New Issue
Block a user