About SwSortedObjs

julien2412 serval2412 at yahoo.fr
Fri Mar 21 18:15:24 PDT 2014


Hello,

Taking a look again at fdo#42371 (see
https://bugs.freedesktop.org/show_bug.cgi?id=42371), I wonder if
SwSortedObjs  could be implemented with a set instead of the vector.
The goal would be to sort automatically the container and insert/remove more
easily+quickly.

Of course, the pb is std::set doesn't have [] operator and needs an iterator
+ advance (or perhaps missed an easy way?) However, leafing through the use
of SwSortedObjs (used by other classes) it seems that [] is mainly
(exclusively?) used in loops.
So to make things easier to migrate (if it worths it of course! :-)), what
about this 3 steps process:
1) Adding an iterator in  SwSortedObjs (quick)
2) use iterator in loops (must be long)
3) replace vector by set (perhaps not too quick if tuning is needed)
?

Any idea?

Julien




--
View this message in context: http://nabble.documentfoundation.org/About-SwSortedObjs-tp4102571.html
Sent from the Dev mailing list archive at Nabble.com.


More information about the LibreOffice mailing list