From 8b9be6fd5ffcc37363efb4228dec9126a8e179a6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 2 Jun 2015 22:57:02 +0200 Subject: loplugin:loopvartoosmall Change-Id: I63917d68b05d6e2f1248bcf88e27952df201d2c5 --- connectivity/source/drivers/macab/macaborder.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'connectivity') diff --git a/connectivity/source/drivers/macab/macaborder.cxx b/connectivity/source/drivers/macab/macaborder.cxx index 399e17922b20..1a5a8f14d552 100644 --- a/connectivity/source/drivers/macab/macaborder.cxx +++ b/connectivity/source/drivers/macab/macaborder.cxx @@ -54,8 +54,8 @@ MacabComplexOrder::MacabComplexOrder() MacabComplexOrder::~MacabComplexOrder() { - for (sal_uInt32 i = 0; i < m_aOrders.size(); i++) - delete m_aOrders[i]; + for (auto p: m_aOrders) + delete p; } void MacabComplexOrder::addOrder(MacabOrder *pOrder) @@ -65,10 +65,9 @@ void MacabComplexOrder::addOrder(MacabOrder *pOrder) sal_Int32 MacabComplexOrder::compare(const MacabRecord *record1, const MacabRecord *record2) const { - for (sal_uInt32 i = 0; i < m_aOrders.size(); i++) + for (auto p: m_aOrders) { - const MacabOrder *pOrder = m_aOrders[i]; - sal_Int32 result = pOrder->compare(record1, record2); + sal_Int32 result = p->compare(record1, record2); if (result) return result; } -- cgit