Potentially incorrect heavyAtoms_end() iterator in core/conformation/Residue.hh

Member Site Forums Rosetta 3 Rosetta 3 – General Potentially incorrect heavyAtoms_end() iterator in core/conformation/Residue.hh

Viewing 1 reply thread
  • Author
    • #1376

        The following is the definition of heavyAtoms_end in Residue.hh

        Atoms::const_iterator heavyAtoms_end() const
        return atoms_.begin() + nheavyatoms() – 1;

        With this definition, any loop of the form for( conformation::Atoms::const_iterator blah = res.sidechainAtoms_begin(); blah != res.heavyAtoms_end(); ++blah), will SKIP iterating over the LAST heavyatom in the residue. From my understanding of the iterator concept, the end iterator should always point to one past the last element to be accessed.

        Is this a bug or am I missing something here?

      • #7608

          You are correct that this is incorrect. It was fixed in SVN 46006, which predates 3.4 (SVN 48005) – so I assume you found this in pre-3.4?

        • #7609

            Yes. I found this in 3.3. Is there a changelog that accompanies the new releases?

          • #7610

              We don’t keep a public-facing changelog to that depth. There is a broad-scope new modules list with the releases sometimes. We are considering going to weekly releases; we may integrate that with the bug tracker and do a weekly bugs-fixed-list, but it seems only medium likely.

          Viewing 1 reply thread
          • You must be logged in to reply to this topic.