<div dir="ltr">UNSUBSCRIBE</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 28, 2014 at 11:08 AM, julien2412 <span dir="ltr"><<a href="mailto:serval2412@yahoo.fr" target="_blank">serval2412@yahoo.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
I noticed this part:<br>
    889 void ScDBCollection::DeleteOnTab( SCTAB nTab )<br>
    890 {<br>
...<br>
    908     remove_if(maAnonDBs.begin(), maAnonDBs.end(), func);<br>
    909 }<br>
<br>
"remove_if" is useless since there's no erase.<br>
I thought about adding an "erase" by taking example of this<br>
<a href="http://en.wikipedia.org/wiki/Erase-remove_idiom" target="_blank">http://en.wikipedia.org/wiki/Erase-remove_idiom</a><br>
but AnonDBs doesn't have an ad hoc erase method (like NamedDBs, but this one<br>
has a "simple" erase method), see<br>
<a href="http://opengrok.libreoffice.org/xref/core/sc/inc/dbdata.hxx#152" target="_blank">http://opengrok.libreoffice.org/xref/core/sc/inc/dbdata.hxx#152</a><br>
<br>
Should we remove this line? Should we add an ad hoc "erase" method to<br>
implement erase-remove idiom in NamedDBs + AnonDBs?<br>
<br>
Any thoughts?<br>
<br>
Julien<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://nabble.documentfoundation.org/remove-if-for-nothing-in-dbdata-cxx-sc-module-tp4134249.html" target="_blank">http://nabble.documentfoundation.org/remove-if-for-nothing-in-dbdata-cxx-sc-module-tp4134249.html</a><br>
Sent from the Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
LibreOffice mailing list<br>
<a href="mailto:LibreOffice@lists.freedesktop.org">LibreOffice@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/libreoffice" target="_blank">http://lists.freedesktop.org/mailman/listinfo/libreoffice</a><br>
</blockquote></div><br></div>