Home My Page Projects paradisEO
Summary Activity Tracker Lists Tasks News SCM Files

[#7458] moeoArchive.update(const eoPop < MOEOT > & _pop) can be badly interpreted

Date:
2009-03-12 16:24
Priority:
1
State:
Closed
Submitted by:
Jérémie Humeau (jhumeau)
Assigned to:
Jérémie Humeau (jhumeau)
Category:
Compile
Group:
1.2.*
Resolution:
none
Summary:
moeoArchive.update(const eoPop < MOEOT > & _pop) can be badly interpreted

Detailed description
In moeoArchive line 212:

bool update(const eoPop < MOEOT > & _pop)
{
bool res = false;
for (unsigned int i=0; i<_pop.size(); i++)
{
res = (*this).update(_pop[i]) || res;
-------------------------------------
}
return res;
}

The underlined line can be badly interpreted: the fonction "(*this).update(_pop[i])" is not necessarily called!!!

Please replace that fonction by this one, then recompile:

bool update(const eoPop < MOEOT > & _pop)
{
bool tmp = false;
bool res = false;
for (unsigned int i=0; i<_pop.size(); i++)
{
tmp = (*this).update(_pop[i]);
res = tmp || res;
}
return res;
}

Add A Comment: Notepad

No Comments Have Been Posted

Field Old Value Date By
status_idOpen2011-09-14 11:34liefooga
close_date2011-09-14 11:342011-09-14 11:34liefooga