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


On 07/06/12 17:38, Noel Grandin wrote:
Hi

These patches convert various SV_DECL_PTRARR stuff to std::set and
std::vector in the SVL and SVTOOLS modules.

Passes "make check" at global level, and compiled with debug=true

thanks, pushed.

although there was quite some DBGUTIL code in svtools that didn't build,
apparently the easy-hackers haven't cleaned up the DBG_ASSERTs there yet...

patch #4 does this:

     if ( nDelFromLine != 0xFFFF )
-        pTEParaPortion->GetLines().DeleteAndDestroy( nDelFromLine, 
pTEParaPortion->GetLines().Count() - nDelFromLine );
+        for( TextLines::iterator it = pTEParaPortion->GetLines().begin() + nDelFromLine;
+             it != pTEParaPortion->GetLines().end(); ++it )
+            delete *it;
+        pTEParaPortion->GetLines().erase( pTEParaPortion->GetLines().begin() + nDelFromLine,
+                                          pTEParaPortion->GetLines().end() );

which will happily construct a begin() + 0xFFFF iterator and pass that
to erase.

see, this is exactly why i have acquired the habit to always write { and
} for if statements and loops, even if the body is only one statement :)


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.