summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/evoab2
diff options
context:
space:
mode:
authorArkadiy Illarionov <qarkai@gmail.com>2019-03-09 15:54:13 +0300
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-09 18:31:12 +0100
commit31f96c3e0d13180447c45212158ee69e791c645a (patch)
tree3ec7744b25a3929cafd4bbdffd018a5036055ad7 /connectivity/source/drivers/evoab2
parent4e25914b165d7ed64b3026af758fb857676aacd5 (diff)
Simplify containers iterations in connectivity
Use range-based loop or replace with STL functions Change-Id: I1f7c1ea19cdc8d450b7ed88a663ba9ccb3249304 Reviewed-on: https://gerrit.libreoffice.org/68974 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/drivers/evoab2')
-rw-r--r--connectivity/source/drivers/evoab2/NDriver.cxx4
-rw-r--r--connectivity/source/drivers/evoab2/NResultSet.cxx7
-rw-r--r--connectivity/source/drivers/evoab2/NResultSetMetaData.cxx5
3 files changed, 6 insertions, 10 deletions
diff --git a/connectivity/source/drivers/evoab2/NDriver.cxx b/connectivity/source/drivers/evoab2/NDriver.cxx
index 79a42103c01e..c0e37f9f7beb 100644
--- a/connectivity/source/drivers/evoab2/NDriver.cxx
+++ b/connectivity/source/drivers/evoab2/NDriver.cxx
@@ -55,9 +55,9 @@ void OEvoabDriver::disposing()
::osl::MutexGuard aGuard(m_aMutex);
// when driver will be destroyed so all our connections have to be destroyed as well
- for (OWeakRefArray::iterator i = m_xConnections.begin(); m_xConnections.end() != i; ++i)
+ for (auto& rxConnection : m_xConnections)
{
- Reference< XComponent > xComp(i->get(), UNO_QUERY);
+ Reference< XComponent > xComp(rxConnection.get(), UNO_QUERY);
if (xComp.is())
{
try
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 7681ded2da34..38c51fa89375 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -313,12 +313,9 @@ static int CompareContacts( gconstpointer _lhs, gconstpointer _rhs, gpointer _us
bool bLhs(false), bRhs(false);
const ComparisonData& rCompData = *static_cast< const ComparisonData* >( _userData );
- for ( SortDescriptor::const_iterator sortCol = rCompData.rSortOrder.begin();
- sortCol != rCompData.rSortOrder.end();
- ++sortCol
- )
+ for ( const auto& sortCol : rCompData.rSortOrder )
{
- sal_Int32 nField = sortCol->nField;
+ sal_Int32 nField = sortCol.nField;
GType eFieldType = evoab::getGFieldType( nField );
bool success = getValue( lhs, nField, eFieldType, &aLhsValue, bLhsNull )
diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
index 2d201c4be8cf..7d9f0d152d76 100644
--- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
@@ -41,14 +41,13 @@ OEvoabResultSetMetaData::~OEvoabResultSetMetaData()
void OEvoabResultSetMetaData::setEvoabFields(const ::rtl::Reference<connectivity::OSQLColumns> &xColumns)
{
- OSQLColumns::Vector::const_iterator aIter;
static const char aName[] = "Name";
- for (aIter = xColumns->get().begin(); aIter != xColumns->get().end(); ++aIter)
+ for (const auto& rxColumn : xColumns->get())
{
OUString aFieldName;
- (*aIter)->getPropertyValue(aName) >>= aFieldName;
+ rxColumn->getPropertyValue(aName) >>= aFieldName;
guint nFieldNumber = findEvoabField(aFieldName);
if (nFieldNumber == guint(-1))
{