diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-02-26 21:45:06 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-02-27 09:12:59 +0100 |
commit | 573f87f6ea57a248c79f52b1cd4e5f1978112567 (patch) | |
tree | d5425462ab8c9a4a0c2f18e8bf79fe6bef1380ac /comphelper/source/property | |
parent | 59363e639b67a8acbd6da240635de47921b2c955 (diff) |
Use for-range loops in comphelper and configmgr
Change-Id: I91033395cb30a4ba9e65adb89712b3c70a39a508
Reviewed-on: https://gerrit.libreoffice.org/50396
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'comphelper/source/property')
-rw-r--r-- | comphelper/source/property/ChainablePropertySetInfo.cxx | 5 | ||||
-rw-r--r-- | comphelper/source/property/MasterPropertySetInfo.cxx | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/comphelper/source/property/ChainablePropertySetInfo.cxx b/comphelper/source/property/ChainablePropertySetInfo.cxx index 00f6720324b0..37eba79cea09 100644 --- a/comphelper/source/property/ChainablePropertySetInfo.cxx +++ b/comphelper/source/property/ChainablePropertySetInfo.cxx @@ -59,14 +59,15 @@ Sequence< ::Property > SAL_CALL ChainablePropertySetInfo::getProperties() maProperties.realloc ( nSize ); Property* pProperties = maProperties.getArray(); - for (PropertyInfoHash::const_iterator aIter(maMap.begin()), aEnd(maMap.end()); aIter != aEnd; ++aIter, ++pProperties) + for (auto const& elem : maMap) { - PropertyInfo const * pInfo = (*aIter).second; + PropertyInfo const * pInfo = elem.second; pProperties->Name = pInfo->maName; pProperties->Handle = pInfo->mnHandle; pProperties->Type = pInfo->maType; pProperties->Attributes = pInfo->mnAttributes; + ++pProperties; } } return maProperties; diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index 35a9a5faee1d..fc94d8436ce9 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -68,14 +68,15 @@ Sequence< ::Property > SAL_CALL MasterPropertySetInfo::getProperties() maProperties.realloc ( nSize ); Property* pProperties = maProperties.getArray(); - for (PropertyDataHash::const_iterator aIter(maMap.begin()), aEnd(maMap.end()) ; aIter != aEnd; ++aIter, ++pProperties) + for (auto const& elem : maMap) { - PropertyInfo const * pInfo = (*aIter).second->mpInfo; + PropertyInfo const * pInfo = elem.second->mpInfo; pProperties->Name = pInfo->maName; pProperties->Handle = pInfo->mnHandle; pProperties->Type = pInfo->maType; pProperties->Attributes = pInfo->mnAttributes; + ++pProperties; } } return maProperties; |