diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2011-11-30 15:55:07 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2017-06-24 15:22:50 +0200 |
commit | 388bc971c56b82fd4716d3b4fd16d0efed15e947 (patch) | |
tree | 4ba908af7085fbc4e1cc9ba90bfd507fcfc75eed | |
parent | 31b8ba7f8a8efbc6e04023c6138e17738d07a490 (diff) |
LEM TODO note
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 2d9f97c47a24..ec7fa5af8782 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -864,6 +864,13 @@ OUString UHashMap::getNameFromId(sal_uInt32 nId) { const UHashMapImpl &rMap = GetUHashImpl(); + // TODO: UHashImpl should rather be a bidirectional hash map than unidirectional; + // This function is linear :-( + // See http://www.codeproject.com/KB/stl/bimap.aspx or just use an Object wrapper around two maps. + // Ah, better see: http://www.boost.org/doc/libs/1_48_0/libs/multi_index/doc/examples.html#example4 + // Even better, see http://www.boost.org/doc/libs/1_48_0/libs/bimap/doc/html/index.html + // See if there is a hashed variant of that. + for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); ++it) { if (it->second == nId) |