summaryrefslogtreecommitdiff
path: root/vcl/unx/generic/gdi/cairotextrender.cxx
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2018-10-14 12:00:03 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-10-14 17:30:32 +0200
commit19be86249dcc5b13b3c95f5469600fa2bc1b749b (patch)
treee1468590650eea60e3897a8cb8b7c36bb9ab996b /vcl/unx/generic/gdi/cairotextrender.cxx
parent7758115d15ded2afd81946df0865ecc831b179aa (diff)
Simplify containers iterations in vcl
Use range-based loop or replace with STL functions. Change-Id: Ide2f89194238ae6a1f21e8132e2297710d9e6dcd Reviewed-on: https://gerrit.libreoffice.org/61756 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/generic/gdi/cairotextrender.cxx')
-rw-r--r--vcl/unx/generic/gdi/cairotextrender.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 40e1c5a8db3b..b7356eda56a5 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -129,10 +129,10 @@ void CairoFontsCache::CacheFont(void *pFont, const CairoFontsCache::CacheId &rId
void* CairoFontsCache::FindCachedFont(const CairoFontsCache::CacheId &rId)
{
- LRUFonts::iterator aEnd = maLRUFonts.end();
- for (LRUFonts::iterator aI = maLRUFonts.begin(); aI != aEnd; ++aI)
- if (aI->second == rId)
- return aI->first;
+ auto aI = std::find_if(maLRUFonts.begin(), maLRUFonts.end(),
+ [&rId](const LRUFonts::value_type& rFont) { return rFont.second == rId; });
+ if (aI != maLRUFonts.end())
+ return aI->first;
return nullptr;
}