2010/6/16 Eike Rathke wrote: > Hi Bartosz, > > On Tuesday, 2010-06-15 09:06:19 +0200, Bartosz wrote: > >> After replace svArrays by STL containers, in some cases I observed boost of >> performance. >> >> For example: >> for (USHORT i = 0; i < aEntries.size(); ++i) > > Please ensure to adapt also all types where necessary, in this case the > result may even be an endless loop if aEntries happens to contain more > than 64k entries.. instead of USHORT i it should be size_t i
Hi Eike. I think that if the endless loop didn't exist before SvArrays replace, then it will not exist after SvReplace. I think previous code: USHORT nCnt = aEntries.Count(); USHORT i; for (i = 0; i< nCnt&& 0 == aRes.Len(); ++i) may also even to endless loop. I would rather replace "USHORT i" variable with " vector< type>::iterator", which can handle huge numbers (it will increase during the memory will deplete). I spent many hours on replacing SvArray by STL. What I should do to propose this patch to commit to OpenOffice.Org? I won't loose my current job. Is it possible to commit this changes to OpenOffice 3.3 ? Best Regards Bartosz --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@openoffice.org For additional commands, e-mail: dev-h...@openoffice.org