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


On 02/07/12 10:41, Noel Grandin wrote:
Hi

This collection of small patches converts various places from using raw 
SvPtrarr to using STL containers.

thanks, pushed to master.

patch #10: if you change an array to an associative array then this
check for size() gets a completely different (and wrong) meaning:

-    if( !pColumns || nIndex >= pColumns->Count() )
+    if( !pColumns || nIndex >= pColumns->size() )


patch #11: in the horrible ugly mess below, the pNew is actually
inserted at the first position, which the new code doesn't do:

-                String* pDel = (String*)aLRULst[ nMaxCount - 1 ];
-
-                void** ppData = (void**)aLRULst.GetData();
-                memmove( ppData+1, ppData, (nMaxCount - 1) * sizeof( void* ));
-                *ppData = pNew;
-
+                SwAutoCompleteString* pDel = aLRULst.back();
+                aLRULst.pop_back();

patch #12: the reverse_iterator actually points to the element preceding
the original "it", so on the first iteration it shouldn't be
incremented, as that has happened implicitly already.

-            while( nListPos )
+            SvxIconChoiceCtrlEntryPtrVec::const_reverse_iterator it2(it);
+            while( ++it2 != rList.rend() )
             {
-                nListPos--;


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.