Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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 :)


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.