[PATCH] more STL work in tools module (6)

Michael Stahl mstahl at redhat.com
Wed Aug 8 03:50:33 PDT 2012


On 07/08/12 14:54, Noel Grandin wrote:
> This is an updated version of the last patch, which now passes make check.

so it gets rid of Container, which is good.

the UniqueIndex class used to be some kind of encoding of an associative
array into an array, so using a std::map seems appropriate. but i think
it would be even better to remove the UniqueIndex class completely, it
appears that there are still remnants of the old array-mapping in e.g.
UniqueIndexImpl::Insert that seem pointless, also the NextIndex() looks
rather slow, just using map iterators directly would be faster.  just
compute the next key on inserting with something like rbegin()->first +
1 (check for empty() first), that could be a stand-alone function at the
use site.



More information about the LibreOffice mailing list