Skip to content
Snippets Groups Projects
Commit 15add151 authored by Cyrille Valladeau's avatar Cyrille Valladeau
Browse files

ENH : wrong initialaization : 1 pointer for all vector elements...

parent fa13f0b9
No related branches found
No related tags found
No related merge requests found
......@@ -68,9 +68,9 @@ void
AtmosphericRadiativeTerms
::ValuesInitialization(unsigned int nbChannel)
{
ValueType temp = AtmosphericRadiativeTermsSingleChannel::New();
for (unsigned int j=0; j<nbChannel; ++j)
{
ValueType temp = AtmosphericRadiativeTermsSingleChannel::New();
m_Values.push_back(temp);
}
m_IsInitialized = true;
......@@ -223,6 +223,7 @@ void
AtmosphericRadiativeTerms
::SetIntrinsicAtmosphericReflectance(unsigned int id, const double & val)
{
std::cout<<m_Values.size()<<" "<<id+1<<std::endl;
if ( m_Values.size()<id+1 )
{
for (unsigned int j=0; j<(id+1-m_Values.size());++j)
......@@ -231,6 +232,7 @@ AtmosphericRadiativeTerms
m_Values.push_back(temp);
}
}
std::cout<<m_Values.size()<<" "<<id+1<<std::endl;
m_Values[id]->SetIntrinsicAtmosphericReflectance(val);
}
void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment