diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-02 18:28:15 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-02 18:28:36 +0200 |
commit | 2dd0c65cb20ed42b31e854b7da1afd6fc03b4325 (patch) | |
tree | 40a67f62add4a23ed963d0f7184513503709bde5 /connectivity | |
parent | 8890e3f44d786b48deeec42288da58149f0c9703 (diff) |
Use range-based for
Change-Id: Ie10317f3ffcaa8032417584cb056007c5f67ea91
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/kab/korder.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/connectivity/source/drivers/kab/korder.cxx b/connectivity/source/drivers/kab/korder.cxx index 9418a56b1356..6ff1f0c8915a 100644 --- a/connectivity/source/drivers/kab/korder.cxx +++ b/connectivity/source/drivers/kab/korder.cxx @@ -56,8 +56,8 @@ KabComplexOrder::KabComplexOrder() KabComplexOrder::~KabComplexOrder() { - for (std::vector<KabOrder *>::size_type i = 0; i < m_aOrders.size(); i++) - delete m_aOrders[i]; + for (auto p: m_aOrders) + delete p; } void KabComplexOrder::addOrder(KabOrder *pOrder) @@ -67,10 +67,9 @@ void KabComplexOrder::addOrder(KabOrder *pOrder) sal_Int32 KabComplexOrder::compare(const ::KABC::Addressee &aAddressee1, const ::KABC::Addressee &aAddressee2) const { - for (std::vector<KabOrder *>::size_type i = 0; i < m_aOrders.size(); i++) + for (auto p: m_aOrders) { - const KabOrder *pOrder = m_aOrders[i]; - sal_Int32 result = pOrder->compare(aAddressee1, aAddressee2); + sal_Int32 result = p->compare(aAddressee1, aAddressee2); if (result) return result; } |