diff options
Diffstat (limited to 'svx/source/unodraw/unoprov.cxx')
-rw-r--r-- | svx/source/unodraw/unoprov.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx index 64e2649d7d7c..2d4def595acb 100644 --- a/svx/source/unodraw/unoprov.cxx +++ b/svx/source/unodraw/unoprov.cxx @@ -833,11 +833,10 @@ OUString UHashMap::getNameFromId(sal_uInt32 nId) { const UHashMapImpl &rMap = GetUHashImpl(); - for (UHashMapImpl::const_iterator it = rMap.begin(); it != rMap.end(); ++it) - { - if (it->second == nId) - return it->first; - } + auto it = std::find_if(rMap.begin(), rMap.end(), + [nId](const UHashMapImpl::value_type& rEntry) { return rEntry.second == nId; }); + if (it != rMap.end()) + return it->first; OSL_FAIL("[CL] unknown SdrObject identifier"); return OUString(); } |