diff options
-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; } |