[PUSHED] Re: [PATCH] convert more SV_DECL_PTRARR in SW module

Michael Stahl mstahl at redhat.com
Fri May 25 01:21:44 PDT 2012


On 24/05/12 10:37, Noel Grandin wrote:
> Hi
> 
> These patches convert various places to use boost::ptr_vector or 
> std::vector.
> 
> They were all compiled with "make debug=t" and they all pass "make check"

thanks again, pushed to master, with following tweaks:

patch #12 the Remove(1, Count()-1) should go until end().

patch #15 introduces a memory leak because ~SwCache only exists when
DBG_UTIL is defined.

oh, and the mac tinderbox didn't like the plain "vector" in the
constructors in patch #13, looks like it wants the full
std::vector<SwFlySave*> type.

> Note that I've now converted all of the "easy" ones in the SW module, so 
> I'm going to move on to the SC module.
> 
> In particular, I've found PTRARR_SORT_DEL to be hard to convert. Mostly 
> because the logical conversion is to use std::set, but a lot of the code 
> stores indexes into the PTRARR, which doesn't work with a std::set.

i imagine that's not entirely trivial, recently a busted conversion from
one of these to std::map was backed out because it introduced
regressions due to use of indexes in the old code



More information about the LibreOffice mailing list