summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/configsettings.cxx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2018-01-28 22:46:46 +0100
committerJulien Nabet <serval2412@yahoo.fr>2018-01-29 07:02:23 +0100
commit85b3c799ede62a3d7ad0493fc80b629214956601 (patch)
tree28744ea275da6fce4bab05aaeed97d0ca21108e7 /vcl/source/gdi/configsettings.cxx
parentfe41d0ff8c426fe5934872de8b0dcb167cb636a2 (diff)
Modernize a bit vcl (part2)
by using for-range loops + use returned iterator by erase method + avoid some iterators calculus by using plain loop Change-Id: I196a52c3c7d0e2705d5ab0e3ea06bd4a4b83bb67 Reviewed-on: https://gerrit.libreoffice.org/48805 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'vcl/source/gdi/configsettings.cxx')
-rw-r--r--vcl/source/gdi/configsettings.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/vcl/source/gdi/configsettings.cxx b/vcl/source/gdi/configsettings.cxx
index 25ec2cd50c74..8fe7e5b95ff1 100644
--- a/vcl/source/gdi/configsettings.cxx
+++ b/vcl/source/gdi/configsettings.cxx
@@ -59,19 +59,18 @@ void SettingsConfigItem::ImplCommit()
{
std::unordered_map< OUString, SmallOUStrMap >::const_iterator group;
- for( group = m_aSettings.begin(); group != m_aSettings.end(); ++group )
+ for (auto const& setting : m_aSettings)
{
- OUString aKeyName( group->first );
+ OUString aKeyName( setting.first );
/*bool bAdded =*/ AddNode( OUString(), aKeyName );
Sequence< PropertyValue > aValues( group->second.size() );
PropertyValue* pValues = aValues.getArray();
int nIndex = 0;
- SmallOUStrMap::const_iterator it;
- for( it = group->second.begin(); it != group->second.end(); ++it )
+ for (auto const& elem : group->second)
{
- pValues[nIndex].Name = aKeyName + "/" + it->first;
+ pValues[nIndex].Name = aKeyName + "/" + elem.first;
pValues[nIndex].Handle = 0;
- pValues[nIndex].Value <<= it->second;
+ pValues[nIndex].Value <<= elem.second;
pValues[nIndex].State = PropertyState_DIRECT_VALUE;
nIndex++;
}