[PATCH] 2/2 List cleanup in SD

Rafael Dominguez venccsralph at gmail.com
Wed Apr 11 13:42:15 PDT 2012


On Wed, Apr 11, 2012 at 2:53 PM, Caolán McNamara <caolanm at redhat.com> wrote:

> On Tue, 2012-04-10 at 12:52 +0200, Lubos Lunak wrote:
> >      List*                   GetSelectEntryList( sal_uInt16 nDepth );
> > +    void                    GetSelectEntryList (sal_uInt16 nDepth,
> > std::vector<rtl::OUString> &rEntries) const;
> >
> >  Why is that? Changing the return value to a reference argument makes
> the API
> > worse and it seems like an unnecessary change to me.
>
> Sorry, missed your earlier review. Yeah, struck me as well, but a quick
> attempt to remove all uses of the older one shows that there is a good
> bit of work still to do before e.g. removing the older
> GetSelectEntryList and making the new one return a vector, so the two
> still need to coexist for the moment. Maybe renaming the new
> GetSelectEntryList to say, getSelectEntryList, and have it return a
> vector, or let Rafael iterate through the rest of the nasty cases and
> change over afterwards.
>
> C.
>
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>

Well the first reason is that you cant overload a function with a return
value, second reason and the main one, is that copying a vector is "costly"
so to prevent that i passes it by reference avoids that, but i can change
it later if needed. I already finished the porting all the needed code, but
didnt want to send it all because its alot of patches. I wanted another
people review to double check i didnt mess it up.

Can i send the rest of the patches? or maybe send it by parts?? Thanks for
reviewing
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120411/f3fb19b8/attachment.html>


More information about the LibreOffice mailing list