mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Code review, brush-up, and extended surface unit tests
This commit is contained in:
committed by
Magne Sjaastad
parent
e5f3a3b67d
commit
10e4c60073
@@ -53,23 +53,15 @@ std::pair<std::vector<cvf::Vec3d>, std::vector<unsigned>> RigGocadData::gocadGeo
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<float> RigGocadData::propertyValues( const QString& property )
|
||||
{
|
||||
size_t propertyIdx = 0;
|
||||
|
||||
for ( propertyIdx = 0; propertyIdx < m_propertyNames.size(); propertyIdx++ )
|
||||
for ( size_t propertyIdx = 0; propertyIdx < m_propertyNames.size(); propertyIdx++ )
|
||||
{
|
||||
if ( m_propertyNames[propertyIdx] == property ) break;
|
||||
if ( m_propertyNames[propertyIdx] == property )
|
||||
{
|
||||
return m_propertyValues[propertyIdx];
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<float> propValues;
|
||||
|
||||
propValues.reserve( m_propertyValues.size() );
|
||||
|
||||
for ( size_t i = 0; i < m_propertyValues.size(); i++ )
|
||||
{
|
||||
propValues.push_back( m_propertyValues[i][propertyIdx] );
|
||||
}
|
||||
|
||||
return propValues;
|
||||
return std::vector<float>(); // return empty vector in case property was not found
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user