Hi, Noel!
Fair enough. Thanks for fixing this.
As for the indexing issue (patch 3196280, 3202124) - as explained in
patch 3202124, the issue was that OBMol::GetInternalCoord() returned a
vector of N or N+1 elements depending on whether
OBMol::SetInternalCoord() has been called before or not. In m
This bug is now fixed in r4494. Thanks for reporting.
Your patch relies on implementation details of the iterators which may
change in future, so instead created a temporary vector in the first
loop, and then deleted the atoms in the vector.
- Noel
On 27 May 2011 13:28, My Th wrote:
> I think
I think what I'm doing in that patch is legal and well defined.
DeleteAtom basically does this:
_vatom.erase(_vatom.begin()+(atom->GetIdx()-1));
where _vatom is a vector of pointers to atoms. When the element of the
vector is deleted then all the iterators and references to elements
__after__ the
Regarding Patch 3196285, AFAIK, all of our iterators are undefined
when you call DeleteAtom (this is a C++ idiom). The recommended way of
doing this is to append the atom to be deleted to a vector, and then
delete all members of the vector once the loop is over.
Anyone else?
- Noel
On 27 May 201
Hi!
A while ago I posted these patches in the tracker:
https://sourceforge.net/tracker/?func=detail&aid=3196280&group_id=40728&atid=428742
https://sourceforge.net/tracker/?func=detail&aid=3196285&group_id=40728&atid=428742
The first one fixes indexing in obutil.cpp::InternalToCartesian(), the
sec