On 18/04/12 17:27, Noel Grandin wrote: > These patches convert the usage of SV_DECL_PTRARR in SVX module to > std::set, std::vector and boost::ptr_vector variously. > > Survived a "make svx.check" and a "make subsequentcheck" (at least up > until the point at which my Ubuntu box has a problem with one of the > smoketest checks).
great, i've pushed them now, with a minor tweak to fix some signed vs. unsigned comparison warnings in debug assertions. the one change that had me concerned for a while is this: > - m_arrCurrentSelection.Remove( i - 1, 1 ); > + m_arrCurrentSelection.erase( --(it.base()) ); where it is a std::set::reverse_iterator; but it seems like this is actually correct because the reverse_iterator is a wrapper for an iterator that points 1 element ahead, such that the --(it.base()) expression will return an iterator that points to the same element as the reverse_iterator, and furthermore the reverse_iterator is not actually invalidated by the erase because internally it points one element ahead. googling found me this relevant mail: http://lists.boost.org/Archives/boost/2001/07/14701.php > License is on file. we know you by now, no need to write that in every mail :) _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice