remove_if for nothing in dbdata.cxx (sc module)

Will Entriken fulldecent at gmail.com
Sun Dec 28 16:37:51 PST 2014


UNSUBSCRIBE

On Sun, Dec 28, 2014 at 11:08 AM, julien2412 <serval2412 at yahoo.fr> wrote:

> Hello,
>
> I noticed this part:
>     889 void ScDBCollection::DeleteOnTab( SCTAB nTab )
>     890 {
> ...
>     908     remove_if(maAnonDBs.begin(), maAnonDBs.end(), func);
>     909 }
>
> "remove_if" is useless since there's no erase.
> I thought about adding an "erase" by taking example of this
> http://en.wikipedia.org/wiki/Erase-remove_idiom
> but AnonDBs doesn't have an ad hoc erase method (like NamedDBs, but this
> one
> has a "simple" erase method), see
> http://opengrok.libreoffice.org/xref/core/sc/inc/dbdata.hxx#152
>
> Should we remove this line? Should we add an ad hoc "erase" method to
> implement erase-remove idiom in NamedDBs + AnonDBs?
>
> Any thoughts?
>
> Julien
>
>
>
> --
> View this message in context:
> http://nabble.documentfoundation.org/remove-if-for-nothing-in-dbdata-cxx-sc-module-tp4134249.html
> Sent from the Dev mailing list archive at Nabble.com.
> _______________________________________________
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/libreoffice
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20141228/58c6e332/attachment.html>


More information about the LibreOffice mailing list