[Ns-bugs] [Bug 171] New: code bug in function (olsr)AgentImpl::MprComputation() about using std::vector::erase().
bugzilla-daemon@nsnam-www.ece.gatech.edu
bugzilla-daemon at nsnam-www.ece.gatech.edu
Tue Apr 15 05:27:25 PDT 2008
http://www.nsnam.org/bugzilla/show_bug.cgi?id=171
Summary: code bug in function (olsr)AgentImpl::MprComputation()
about using std::vector::erase().
Product: ns-3
Version: unspecified
Platform: All
OS/Version: Windows
Status: NEW
Keywords: bug
Severity: minor
Priority: P3
Component: routing
AssignedTo: ns-bugs at isi.edu
ReportedBy: liujatp at gmail.com
there were code bug in function AgentImpl::MprComputation() about using
std::vector.erase(). (In Version ns-3-dev)
when i run the simple-point-to-point-olsr.cc, exceptions tracked.
Commonly, std::vetor::erase() used like this example:
/*****************************************************/
vector<int> arr;
arr.push_back(8);
for(vector<int>::iterator it=.begin(); it!=arr.end(); )
{
if(* it == 8)
{
it = arr.erase(it);
}
else
{
++it;
}
}
/*****************************************************/
Also a patch file attached below.
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Ns-bugs
mailing list