[Libreoffice-commits] core.git: ucb/source

Mike Kaganski mike.kaganski at collabora.com
Thu Nov 9 12:41:46 UTC 2017


 ucb/source/inc/regexpmap.hxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 9b4d079d578dcb5cdc173e44604e078267ea9840
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Thu Nov 9 11:00:44 2017 +0200

    RegexpMap::map: use range-based for
    
    Change-Id: I90ae184e3400f7a35419a705c62c482932065b0f
    Reviewed-on: https://gerrit.libreoffice.org/44524
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/ucb/source/inc/regexpmap.hxx b/ucb/source/inc/regexpmap.hxx
index 41f02cfb4277..665c6aa4f29f 100644
--- a/ucb/source/inc/regexpmap.hxx
+++ b/ucb/source/inc/regexpmap.hxx
@@ -519,11 +519,9 @@ Val const * RegexpMap< Val >::map(rtl::OUString const & rString) const
     {
         std::vector< Entry<Val> > const & rTheList = m_aImpl.m_aList[n];
 
-        typename std::vector< Entry<Val> >::const_iterator aEnd(rTheList.end());
-        for (typename std::vector< Entry<Val> >::const_iterator aIt(rTheList.begin()); aIt != aEnd;
-             ++aIt)
-            if (aIt->m_aRegexp.matches(rString))
-                return &aIt->m_aValue;
+        for (auto const & rItem : rTheList)
+            if (rItem.m_aRegexp.matches(rString))
+                return &rItem.m_aValue;
     }
     if (m_aImpl.m_pDefault
         && m_aImpl.m_pDefault->m_aRegexp.matches(rString))


More information about the Libreoffice-commits mailing list