Skip to content

Commit

Permalink
Converted assert to if statement when no NNC data is present
Browse files Browse the repository at this point in the history
  • Loading branch information
magnesj committed Sep 24, 2014
1 parent 212b41f commit b046a03
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions ApplicationCode/ReservoirDataModel/RigNNCData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,13 @@ const std::vector<double>* RigNNCData::connectionScalarResult(size_t scalarResul
void RigNNCData::setCombTransmisibilityScalarResultIndex(size_t scalarResultIndex)
{
std::map<size_t, std::vector<double> >::iterator it = m_connectionResults.find(cvf::UNDEFINED_SIZE_T);
CVF_ASSERT(it != m_connectionResults.end());

std::vector<double>& emptyData = m_connectionResults[scalarResultIndex];
std::vector<double>& realData = m_connectionResults[cvf::UNDEFINED_SIZE_T];
emptyData.swap(realData);
m_connectionResults.erase(cvf::UNDEFINED_SIZE_T);
if (it != m_connectionResults.end())
{
std::vector<double>& emptyData = m_connectionResults[scalarResultIndex];
std::vector<double>& realData = m_connectionResults[cvf::UNDEFINED_SIZE_T];
emptyData.swap(realData);
m_connectionResults.erase(cvf::UNDEFINED_SIZE_T);
}
}

//--------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit b046a03

Please sign in to comment.