summaryrefslogtreecommitdiff
path: root/framework/source/accelerators/acceleratorcache.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source/accelerators/acceleratorcache.cxx')
-rw-r--r--framework/source/accelerators/acceleratorcache.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/framework/source/accelerators/acceleratorcache.cxx b/framework/source/accelerators/acceleratorcache.cxx
index ec5d35323953..18512cc826cf 100644
--- a/framework/source/accelerators/acceleratorcache.cxx
+++ b/framework/source/accelerators/acceleratorcache.cxx
@@ -71,13 +71,9 @@ AcceleratorCache::TKeyList AcceleratorCache::getAllKeys() const
TKeyList lKeys;
lKeys.reserve(m_lKey2Commands.size());
- TKey2Commands::const_iterator pIt;
- TKey2Commands::const_iterator pEnd = m_lKey2Commands.end();
- for ( pIt = m_lKey2Commands.begin();
- pIt != pEnd;
- ++pIt )
+ for (auto const& key2Command : m_lKey2Commands)
{
- lKeys.push_back(pIt->first);
+ lKeys.push_back(key2Command.first);
}
return lKeys;
@@ -141,13 +137,9 @@ void AcceleratorCache::removeCommand(const OUString& sCommand)
SolarMutexGuard g;
const TKeyList& lKeys = getKeysByCommand(sCommand);
- AcceleratorCache::TKeyList::const_iterator pKey;
- for ( pKey = lKeys.begin();
- pKey != lKeys.end();
- ++pKey )
+ for (auto const& lKey : lKeys)
{
- const css::awt::KeyEvent& rKey = *pKey;
- removeKey(rKey);
+ removeKey(lKey);
}
m_lCommand2Keys.erase(sCommand);
}