Kaydet (Commit) 9b4d079d authored tarafından Mike Kaganski's avatar Mike Kaganski

RegexpMap::map: use range-based for

Change-Id: I90ae184e3400f7a35419a705c62c482932065b0f
Reviewed-on: https://gerrit.libreoffice.org/44524Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst a8a3fa2e
......@@ -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))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment