diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-03-18 10:34:42 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-03-18 11:33:16 +0100 |
commit | 1e3a5bb9e92aea074d7350ccde0dae5c123e885d (patch) | |
tree | 1244921df6b85b0e7ba81e74043a72251be5070f /hwpfilter | |
parent | 2980e65d9728cfee73c1c49d64e19af50f756521 (diff) |
Use for-range loops in hwpfilter, i18n*, idl* and io
Change-Id: I980464162b73ed9ee0a09acbca1b9050af8d1027
Reviewed-on: https://gerrit.libreoffice.org/51492
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/attributes.cxx | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/hwpfilter/source/attributes.cxx b/hwpfilter/source/attributes.cxx index 49a94c6a25bd..533769d879ac 100644 --- a/hwpfilter/source/attributes.cxx +++ b/hwpfilter/source/attributes.cxx @@ -96,13 +96,11 @@ OUString AttributeListImpl::getValueByIndex(sal_Int16 i) OUString AttributeListImpl::getTypeByName( const OUString& sName ) { - std::vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin(); - - for (; ii != m_pImpl->vecAttribute.end(); ++ii) + for (auto const& elem : m_pImpl->vecAttribute) { - if( (*ii).sName == sName ) + if( elem.sName == sName ) { - return (*ii).sType; + return elem.sType; } } return OUString(); @@ -111,13 +109,11 @@ OUString AttributeListImpl::getTypeByName( const OUString& sName ) OUString AttributeListImpl::getValueByName(const OUString& sName) { - std::vector<struct TagAttribute>::iterator ii = m_pImpl->vecAttribute.begin(); - - for (; ii != m_pImpl->vecAttribute.end(); ++ii) + for (auto const& elem : m_pImpl->vecAttribute) { - if( (*ii).sName == sName ) + if( elem.sName == sName ) { - return (*ii).sValue; + return elem.sValue; } } return OUString(); |