diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-03-29 07:12:02 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-03-29 07:12:02 +0100 |
commit | 7ec010c8c2311bba4b97c023ba04feabc38ae7d1 (patch) | |
tree | 61397806ba319302be31678b020ce42a548a198c /comphelper | |
parent | Use const_iterator instead of iterator (diff) | |
download | core-7ec010c8c2311bba4b97c023ba04feabc38ae7d1.tar.gz core-7ec010c8c2311bba4b97c023ba04feabc38ae7d1.zip |
Use const_iterator and put them in for loop
Change-Id: I1dbfe5735580d940081298c372c12db8a3c3b3a3
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/property/ChainablePropertySetInfo.cxx | 4 | ||||
-rw-r--r-- | comphelper/source/property/MasterPropertySetInfo.cxx | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/comphelper/source/property/ChainablePropertySetInfo.cxx b/comphelper/source/property/ChainablePropertySetInfo.cxx index aa769539b10b..413651814157 100644 --- a/comphelper/source/property/ChainablePropertySetInfo.cxx +++ b/comphelper/source/property/ChainablePropertySetInfo.cxx @@ -84,9 +84,7 @@ Sequence< ::Property > SAL_CALL ChainablePropertySetInfo::getProperties() maProperties.realloc ( nSize ); Property* pProperties = maProperties.getArray(); - PropertyInfoHash::iterator aIter = maMap.begin(); - const PropertyInfoHash::iterator aEnd = maMap.end(); - for ( ; aIter != aEnd; ++aIter, ++pProperties) + for (PropertyInfoHash::const_iterator aIter(maMap.begin()), aEnd(maMap.end()); aIter != aEnd; ++aIter, ++pProperties) { PropertyInfo* pInfo = (*aIter).second; diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx index d0f9cd0f0ba6..e59d907d163f 100644 --- a/comphelper/source/property/MasterPropertySetInfo.cxx +++ b/comphelper/source/property/MasterPropertySetInfo.cxx @@ -101,9 +101,7 @@ Sequence< ::Property > SAL_CALL MasterPropertySetInfo::getProperties() maProperties.realloc ( nSize ); Property* pProperties = maProperties.getArray(); - PropertyDataHash::iterator aIter = maMap.begin(); - const PropertyDataHash::iterator aEnd = maMap.end(); - for ( ; aIter != aEnd; ++aIter, ++pProperties) + for (PropertyDataHash::const_iterator aIter(maMap.begin()), aEnd(maMap.end()) ; aIter != aEnd; ++aIter, ++pProperties) { PropertyInfo* pInfo = (*aIter).second->mpInfo; |