summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2016-03-28 21:42:43 +0200
committerJulien Nabet <serval2412@yahoo.fr>2016-03-28 20:28:28 +0000
commita8ef64199b4bb03fb652b7dfbed7be126bd99059 (patch)
treeaf40d94aebb9fac561debaa13fce708332750c53 /connectivity
parent2b60e64c18e16391ab7e04d1ded1119b8b5428ac (diff)
Use const_iterator when possible (connectivity)
Change-Id: I749e4c3ffa0c89f919459c376edad4804b2b66ca Reviewed-on: https://gerrit.libreoffice.org/23573 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/commontools/TColumnsHelper.cxx2
-rw-r--r--connectivity/source/commontools/TDatabaseMetaDataBase.cxx2
-rw-r--r--connectivity/source/commontools/TTableHelper.cxx2
-rw-r--r--connectivity/source/commontools/dbtools.cxx12
-rw-r--r--connectivity/source/commontools/dbtools2.cxx2
-rw-r--r--connectivity/source/commontools/paramwrapper.cxx2
-rw-r--r--connectivity/source/cpool/ZConnectionPool.cxx2
-rw-r--r--connectivity/source/drivers/ado/ADriver.cxx2
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
-rw-r--r--connectivity/source/drivers/file/FDriver.cxx2
-rw-r--r--connectivity/source/drivers/file/FNoException.cxx2
-rw-r--r--connectivity/source/drivers/file/FResultSet.cxx10
-rw-r--r--connectivity/source/drivers/file/fanalyzer.cxx2
-rw-r--r--connectivity/source/drivers/file/fcode.cxx2
-rw-r--r--connectivity/source/drivers/hsqldb/HDriver.cxx8
-rw-r--r--connectivity/source/drivers/hsqldb/HStorageMap.cxx10
-rw-r--r--connectivity/source/drivers/jdbc/DatabaseMetaData.cxx4
-rw-r--r--connectivity/source/drivers/kab/KDatabaseMetaData.cxx2
-rw-r--r--connectivity/source/drivers/kab/kfields.cxx2
-rw-r--r--connectivity/source/drivers/mork/MColumnAlias.cxx2
-rw-r--r--connectivity/source/drivers/mork/MConnection.cxx2
-rw-r--r--connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx4
-rw-r--r--connectivity/source/drivers/mork/MQueryHelper.cxx10
-rw-r--r--connectivity/source/drivers/mork/MResultSet.cxx12
-rw-r--r--connectivity/source/drivers/mork/MorkParser.cxx24
-rw-r--r--connectivity/source/drivers/mork/mork_helper.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx4
-rw-r--r--connectivity/source/drivers/mysql/YDriver.cxx6
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx14
-rw-r--r--connectivity/source/drivers/postgresql/pq_connection.cxx8
-rw-r--r--connectivity/source/drivers/postgresql/pq_databasemetadata.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx4
-rw-r--r--connectivity/source/manager/mdrivermanager.cxx4
-rw-r--r--connectivity/source/parse/sqliterator.cxx2
34 files changed, 87 insertions, 87 deletions
diff --git a/connectivity/source/commontools/TColumnsHelper.cxx b/connectivity/source/commontools/TColumnsHelper.cxx
index 99392e9276ad..5d6fcf85e5b0 100644
--- a/connectivity/source/commontools/TColumnsHelper.cxx
+++ b/connectivity/source/commontools/TColumnsHelper.cxx
@@ -89,7 +89,7 @@ sdbcx::ObjectType OColumnsHelper::createObject(const OUString& _rName)
bool bIsCurrency = false;
sal_Int32 nDataType = DataType::OTHER;
- ColumnInformationMap::iterator aFind = m_pImpl->m_aColumnInfo.find(_rName);
+ ColumnInformationMap::const_iterator aFind = m_pImpl->m_aColumnInfo.find(_rName);
if ( aFind == m_pImpl->m_aColumnInfo.end() ) // we have to fill it
{
OUString sComposedName = ::dbtools::composeTableNameForSelect( xConnection, m_pTable );
diff --git a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
index 66c09c1e4bb0..e7d040973b90 100644
--- a/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
+++ b/connectivity/source/commontools/TDatabaseMetaDataBase.cxx
@@ -146,7 +146,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaDataBase::getTypeInfo( ) throw(SQ
}
::std::vector<ExpressionNodeSharedPtr>::iterator aIter = aConditions.begin();
- ::std::vector<ExpressionNodeSharedPtr>::iterator aEnd = aConditions.end();
+ ::std::vector<ExpressionNodeSharedPtr>::const_iterator aEnd = aConditions.end();
for (; aIter != aEnd; ++aIter)
{
if ( (*aIter)->evaluate(aRow)->getValue().getBool() )
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 930b2b0a4f05..9d75883ca6bd 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -220,7 +220,7 @@ namespace
// collect all used ordinals
::std::set< OrdinalPosition > aUsedOrdinals;
- for ( ::std::vector< ColumnDesc >::iterator collect = _rColumns.begin();
+ for ( ::std::vector< ColumnDesc >::const_iterator collect = _rColumns.begin();
collect != _rColumns.end();
++collect
)
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 639df3b06d2d..0f1ee600a4fb 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1665,8 +1665,8 @@ namespace
if ( m_aSet.size() < (size_t)Index )
throw IndexOutOfBoundsException();
- ::std::vector<bool, std::allocator<bool> >::iterator aIter = m_aSet.begin();
- ::std::vector<bool, std::allocator<bool> >::iterator aEnd = m_aSet.end();
+ ::std::vector<bool, std::allocator<bool> >::const_iterator aIter = m_aSet.begin();
+ ::std::vector<bool, std::allocator<bool> >::const_iterator aEnd = m_aSet.end();
sal_Int32 i = 0;
sal_Int32 nParamPos = -1;
for(; aIter != aEnd && i <= Index; ++aIter)
@@ -1711,7 +1711,7 @@ void askForParameters(const Reference< XSingleSelectQueryComposer >& _xComposer,
OUString sName;
xParam->getPropertyValue(PROPERTY_NAME) >>= sName;
- TParameterPositions::iterator aFind = aParameterNames.find(sName);
+ TParameterPositions::const_iterator aFind = aParameterNames.find(sName);
if ( aFind != aParameterNames.end() )
aNewParameterSet[i] = true;
aParameterNames[sName].push_back(i+1);
@@ -1762,9 +1762,9 @@ void askForParameters(const Reference< XSingleSelectQueryComposer >& _xComposer,
if (hasProperty(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE), xParamColumn))
xParamColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)) >>= nScale;
// (the index of the parameters is one-based)
- TParameterPositions::iterator aFind = aParameterNames.find(pFinalValues->Name);
- ::std::vector<sal_Int32>::iterator aIterPos = aFind->second.begin();
- ::std::vector<sal_Int32>::iterator aEndPos = aFind->second.end();
+ TParameterPositions::const_iterator aFind = aParameterNames.find(pFinalValues->Name);
+ ::std::vector<sal_Int32>::const_iterator aIterPos = aFind->second.begin();
+ ::std::vector<sal_Int32>::const_iterator aEndPos = aFind->second.end();
for(;aIterPos != aEndPos;++aIterPos)
{
if ( _aParametersSet.empty() || !_aParametersSet[(*aIterPos)-1] )
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx
index b8a97e78fe13..184828958966 100644
--- a/connectivity/source/commontools/dbtools2.cxx
+++ b/connectivity/source/commontools/dbtools2.cxx
@@ -439,7 +439,7 @@ namespace
ColumnInformationMap aInfo(_bCase);
collectColumnInformation(_xConnection,sComposedName,sQuotedName,aInfo);
- ColumnInformationMap::iterator aIter = aInfo.begin();
+ ColumnInformationMap::const_iterator aIter = aInfo.begin();
if ( aIter != aInfo.end() )
{
bAutoIncrement = aIter->second.first.first;
diff --git a/connectivity/source/commontools/paramwrapper.cxx b/connectivity/source/commontools/paramwrapper.cxx
index fc575550b570..e9327d0e0c64 100644
--- a/connectivity/source/commontools/paramwrapper.cxx
+++ b/connectivity/source/commontools/paramwrapper.cxx
@@ -205,7 +205,7 @@ namespace param
if ( m_xValueDestination.is() )
{
- for ( ::std::vector< sal_Int32 >::iterator aIter = m_aIndexes.begin(); aIter != m_aIndexes.end(); ++aIter )
+ for ( ::std::vector< sal_Int32 >::const_iterator aIter = m_aIndexes.begin(); aIter != m_aIndexes.end(); ++aIter )
{
m_xValueDestination->setObjectWithInfo( *aIter + 1, rValue, nParamType, nScale );
// (the index of the parameters is one-based)
diff --git a/connectivity/source/cpool/ZConnectionPool.cxx b/connectivity/source/cpool/ZConnectionPool.cxx
index 9eb953c5fc37..edbd2446b24f 100644
--- a/connectivity/source/cpool/ZConnectionPool.cxx
+++ b/connectivity/source/cpool/ZConnectionPool.cxx
@@ -240,7 +240,7 @@ void OConnectionPool::invalidatePooledConnections()
aIter->second.aConnections.clear();
// look if the iterator aIter is still present in the active connection map
- TActiveConnectionMap::iterator aActIter = m_aActiveConnections.begin();
+ TActiveConnectionMap::const_iterator aActIter = m_aActiveConnections.begin();
for (; aActIter != m_aActiveConnections.end(); ++aActIter)
{
if(aIter == aActIter->second.aPos)
diff --git a/connectivity/source/drivers/ado/ADriver.cxx b/connectivity/source/drivers/ado/ADriver.cxx
index 0fbc2da541c6..a968b28a7d5a 100644
--- a/connectivity/source/drivers/ado/ADriver.cxx
+++ b/connectivity/source/drivers/ado/ADriver.cxx
@@ -205,7 +205,7 @@ Reference< XTablesSupplier > SAL_CALL ODriver::getDataDefinitionByConnection( co
{
OConnection* pSearchConnection = reinterpret_cast< OConnection* >( xTunnel->getSomething(OConnection::getUnoTunnelImplementationId()) );
- for (OWeakRefArray::iterator i = m_xConnections.begin(); m_xConnections.end() != i; ++i)
+ for (OWeakRefArray::const_iterator i = m_xConnections.begin(); m_xConnections.end() != i; ++i)
{
if ((OConnection*) Reference< XConnection >::query(i->get().get()).get() == pSearchConnection)
{
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 928e47175711..c27dd7b8969c 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -2523,7 +2523,7 @@ void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos)
sal_Int32 nCurPos;
- OValueRefVector::Vector::iterator aIter;
+ OValueRefVector::Vector::const_iterator aIter;
for(sal_uInt32 nRowPos = 0; nRowPos < m_aHeader.db_anz;++nRowPos)
{
bool bOk = seekRow( IResultSetHelper::BOOKMARK, nRowPos+1, nCurPos );
diff --git a/connectivity/source/drivers/file/FDriver.cxx b/connectivity/source/drivers/file/FDriver.cxx
index 59c6a8bb1e49..72e02c57ddab 100644
--- a/connectivity/source/drivers/file/FDriver.cxx
+++ b/connectivity/source/drivers/file/FDriver.cxx
@@ -195,7 +195,7 @@ Reference< XTablesSupplier > SAL_CALL OFileDriver::getDataDefinitionByConnection
{
OConnection* pSearchConnection = reinterpret_cast< OConnection* >( xTunnel->getSomething(OConnection::getUnoTunnelImplementationId()) );
OConnection* pConnection = nullptr;
- for (OWeakRefArray::iterator i = m_xConnections.begin(); m_xConnections.end() != i; ++i)
+ for (OWeakRefArray::const_iterator i = m_xConnections.begin(); m_xConnections.end() != i; ++i)
{
if (static_cast<OConnection*>( Reference< XConnection >::query(i->get().get()).get() ) == pSearchConnection)
{
diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx
index ed6fbc911af0..236e846c39c3 100644
--- a/connectivity/source/drivers/file/FNoException.cxx
+++ b/connectivity/source/drivers/file/FNoException.cxx
@@ -93,7 +93,7 @@ OKeyValue* OResultSet::GetOrderbyKeyValue(OValueRefRow& _rRow)
OKeyValue* pKeyValue = OKeyValue::createKeyValue((sal_uInt32)nBookmarkValue);
- ::std::vector<sal_Int32>::iterator aIter = m_aOrderbyColumnNumber.begin();
+ ::std::vector<sal_Int32>::const_iterator aIter = m_aOrderbyColumnNumber.begin();
for (;aIter != m_aOrderbyColumnNumber.end(); ++aIter)
{
OSL_ENSURE(*aIter < static_cast<sal_Int32>(_rRow->get().size()),"Invalid index for orderkey values!");
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index 49ee0d31147b..523651bc0686 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -1122,7 +1122,7 @@ void OResultSet::sortRows()
}
OSortIndex::TKeyTypeVector eKeyType(m_aOrderbyColumnNumber.size());
- ::std::vector<sal_Int32>::iterator aOrderByIter = m_aOrderbyColumnNumber.begin();
+ ::std::vector<sal_Int32>::const_iterator aOrderByIter = m_aOrderbyColumnNumber.begin();
for (::std::vector<sal_Int16>::size_type i=0;aOrderByIter != m_aOrderbyColumnNumber.end(); ++aOrderByIter,++i)
{
OSL_ENSURE((sal_Int32)m_aSelectRow->get().size() > *aOrderByIter,"Invalid Index");
@@ -1337,8 +1337,8 @@ bool OResultSet::OpenImpl()
nKey = (m_pFileSet->get())[j-1];
ExecuteRow(IResultSetHelper::BOOKMARK,nKey,false);
m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping);
- OValueRefVector::Vector::iterator loopInRow = m_aSelectRow->get().begin();
- OValueVector::Vector::iterator existentInSearchRow = aSearchRow->get().begin();
+ OValueRefVector::Vector::const_iterator loopInRow = m_aSelectRow->get().begin();
+ OValueVector::Vector::const_iterator existentInSearchRow = aSearchRow->get().begin();
for ( ++loopInRow,++existentInSearchRow; // the first column is the bookmark column
loopInRow != m_aSelectRow->get().end();
++loopInRow,++existentInSearchRow)
@@ -1452,7 +1452,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow,
typedef ::std::map<OSQLColumns::Vector::iterator,sal_Bool> IterMap;
IterMap aSelectIters;
- OValueRefVector::Vector::iterator aRowIter = _rRow->get().begin()+1;
+ OValueRefVector::Vector::const_iterator aRowIter = _rRow->get().begin()+1;
for (sal_Int32 i=0; // the first column is the bookmark column
aRowIter != _rRow->get().end();
++i, ++aRowIter
@@ -1578,7 +1578,7 @@ void OResultSet::clearInsertRow()
{
m_aRow->setDeleted(false); // set to false here because this is the new row
OValueRefVector::Vector::iterator aIter = m_aInsertRow->get().begin();
- const OValueRefVector::Vector::iterator aEnd = m_aInsertRow->get().end();
+ const OValueRefVector::Vector::const_iterator aEnd = m_aInsertRow->get().end();
for(sal_Int32 nPos = 0;aIter != aEnd;++aIter,++nPos)
{
ORowSetValueDecoratorRef& rValue = (*aIter);
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index 151f70b8dc8b..7f37053879c7 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -132,7 +132,7 @@ void OSQLAnalyzer::bindRow(OCodeList& rCodeList,const OValueRefRow& _pRow)
void OSQLAnalyzer::bindSelectRow(const OValueRefRow& _pRow)
{
// first the select part
- for ( ::std::vector< TPredicates >::iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end();++aIter)
+ for ( ::std::vector< TPredicates >::const_iterator aIter = m_aSelectionEvaluations.begin(); aIter != m_aSelectionEvaluations.end();++aIter)
{
if ( aIter->first.is() )
bindRow(aIter->first->m_aCodeList,_pRow);
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 071ff80be9af..f71502c3ec59 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -363,7 +363,7 @@ void ONthOperator::Exec(OCodeStack& rCodeStack)
rCodeStack.push(new OOperandResult(operate(aValues)));
::std::vector<OOperand*>::iterator aIter = aOperands.begin();
- ::std::vector<OOperand*>::iterator aEnd = aOperands.end();
+ ::std::vector<OOperand*>::const_iterator aEnd = aOperands.end();
for (; aIter != aEnd; ++aIter)
{
if (typeid(OOperandResult) != typeid(*(*aIter)))
diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx b/connectivity/source/drivers/hsqldb/HDriver.cxx
index fc4a2efb0ba4..2d2d1ebbe58c 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -456,7 +456,7 @@ namespace connectivity
Reference< XTablesSupplier > xTab;
- TWeakPairVector::iterator aEnd = m_aConnections.end();
+ TWeakPairVector::const_iterator aEnd = m_aConnections.end();
for (TWeakPairVector::iterator i = m_aConnections.begin(); aEnd != i; ++i)
{
if ( i->second.second.first.get() == connection.get() )
@@ -594,7 +594,7 @@ namespace connectivity
void ODriverDelegator::shutdownConnections()
{
m_bInShutDownConnections = true;
- TWeakPairVector::iterator aEnd = m_aConnections.end();
+ TWeakPairVector::const_iterator aEnd = m_aConnections.end();
for (TWeakPairVector::iterator i = m_aConnections.begin(); aEnd != i; ++i)
{
try
@@ -612,7 +612,7 @@ namespace connectivity
void ODriverDelegator::flushConnections()
{
- TWeakPairVector::iterator aEnd = m_aConnections.end();
+ TWeakPairVector::const_iterator aEnd = m_aConnections.end();
for (TWeakPairVector::iterator i = m_aConnections.begin(); aEnd != i; ++i)
{
try
@@ -636,7 +636,7 @@ namespace connectivity
OUString sKey = StorageContainer::getRegisteredKey(xStorage);
if ( !sKey.isEmpty() )
{
- TWeakPairVector::iterator i = ::std::find_if(m_aConnections.begin(), m_aConnections.end(),
+ TWeakPairVector::const_iterator i = ::std::find_if(m_aConnections.begin(), m_aConnections.end(),
[&sKey] (const TWeakPairVector::value_type& conn) {
return conn.second.first == sKey;
});
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index 334ff2b23970..c52805ee5a60 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -191,7 +191,7 @@ namespace connectivity
OSL_ENSURE(_xStorage.is(),"Storage is NULL!");
TStorages& rMap = lcl_getStorageMap();
// check if the storage is already in our map
- TStorages::iterator aFind = ::std::find_if(rMap.begin(),rMap.end(),
+ TStorages::const_iterator aFind = ::std::find_if(rMap.begin(),rMap.end(),
[&_xStorage] (const TStorages::value_type& storage) {
return storage.second.mapStorage() == _xStorage;
});
@@ -208,7 +208,7 @@ namespace connectivity
{
TStorages::mapped_type aRet;
TStorages& rMap = lcl_getStorageMap();
- TStorages::iterator aFind = rMap.find(_sKey);
+ TStorages::const_iterator aFind = rMap.find(_sKey);
OSL_ENSURE(aFind != rMap.end(),"Storage could not be found in list!");
if ( aFind != rMap.end() )
aRet = aFind->second;
@@ -222,7 +222,7 @@ namespace connectivity
OSL_ENSURE(_xStorage.is(),"Storage is NULL!");
TStorages& rMap = lcl_getStorageMap();
// check if the storage is already in our map
- TStorages::iterator aFind = ::std::find_if(rMap.begin(),rMap.end(),
+ TStorages::const_iterator aFind = ::std::find_if(rMap.begin(),rMap.end(),
[&_xStorage] (const TStorages::value_type& storage) {
return storage.second.mapStorage() == _xStorage;
});
@@ -342,11 +342,11 @@ namespace connectivity
{
TStreamMap::mapped_type pRet;
TStorages& rMap = lcl_getStorageMap();
- TStorages::iterator aFind = rMap.find(jstring2ustring(env,key));
+ TStorages::const_iterator aFind = rMap.find(jstring2ustring(env,key));
OSL_ENSURE(aFind != rMap.end(),"Storage could not be found in list!");
if ( aFind != rMap.end() )
{
- TStreamMap::iterator aStreamFind = aFind->second.streams.find(removeURLPrefix(jstring2ustring(env,name),aFind->second.url));
+ TStreamMap::const_iterator aStreamFind = aFind->second.streams.find(removeURLPrefix(jstring2ustring(env,name),aFind->second.url));
if ( aStreamFind != aFind->second.streams.end() )
pRet = aStreamFind->second;
}
diff --git a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
index 20f78b333d40..2968278fb538 100644
--- a/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
+++ b/connectivity/source/drivers/jdbc/DatabaseMetaData.cxx
@@ -467,8 +467,8 @@ Reference< XResultSet > SAL_CALL java_sql_DatabaseMetaData::getTablePrivileges(
ODatabaseMetaDataResultSet::ORow aRow(8);
while ( xRow.is() && xTemp->next() )
{
- ::std::map<sal_Int32,sal_Int32>::iterator aIter = aColumnMatching.begin();
- ::std::map<sal_Int32,sal_Int32>::iterator aEnd = aColumnMatching.end();
+ ::std::map<sal_Int32,sal_Int32>::const_iterator aIter = aColumnMatching.begin();
+ ::std::map<sal_Int32,sal_Int32>::const_iterator aEnd = aColumnMatching.end();
for (;aIter != aEnd ; ++aIter)
{
sValue = xRow->getString(aIter->first);
diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
index 219e0d980d58..c87e7043f8f8 100644
--- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx
@@ -891,7 +891,7 @@ Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getColumns(
}
::KABC::Field::List aFields = ::KABC::Field::allFields();
- ::KABC::Field::List::iterator aField;
+ ::KABC::Field::List::const_iterator aField;
for ( aField = aFields.begin();
aField != aFields.end();
diff --git a/connectivity/source/drivers/kab/kfields.cxx b/connectivity/source/drivers/kab/kfields.cxx
index 55f5d4d8e220..d19f1caebcb2 100644
--- a/connectivity/source/drivers/kab/kfields.cxx
+++ b/connectivity/source/drivers/kab/kfields.cxx
@@ -58,7 +58,7 @@ sal_uInt32 findKabField(const OUString& columnName) throw(SQLException)
return KAB_FIELD_REVISION;
::KABC::Field::List aFields = ::KABC::Field::allFields();
- ::KABC::Field::List::iterator aField;
+ ::KABC::Field::List::const_iterator aField;
sal_uInt32 nResult;
for ( aField = aFields.begin(), nResult = KAB_DATA_FIELDS;
diff --git a/connectivity/source/drivers/mork/MColumnAlias.cxx b/connectivity/source/drivers/mork/MColumnAlias.cxx
index 28c76a9ab65c..b171e4f04a2e 100644
--- a/connectivity/source/drivers/mork/MColumnAlias.cxx
+++ b/connectivity/source/drivers/mork/MColumnAlias.cxx
@@ -95,7 +95,7 @@ void OColumnAlias::initialize( const ::com::sun::star::uno::Reference< ::com::su
OUStringToOString(
aProgrammaticNames[i], RTL_TEXTENCODING_ASCII_US));
bool bFound = false;
- for (AliasMap::iterator j(m_aAliasMap.begin()); j != m_aAliasMap.end();
+ for (AliasMap::const_iterator j(m_aAliasMap.begin()); j != m_aAliasMap.end();
++j)
{
if (j->second.programmaticAsciiName == sAsciiProgrammaticName) {
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index d8c681d207c2..c034f1613520 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -151,7 +151,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >&
// check that we can retrieve the tables:
MorkTableMap *Tables = m_pBook->getTables( defaultScope );
- MorkTableMap::Map::iterator tableIter;
+ MorkTableMap::Map::const_iterator tableIter;
if (Tables)
{
// Iterate all tables
diff --git a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx
index e5d34d73ed42..38f79c8c289c 100644
--- a/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx
+++ b/connectivity/source/drivers/mork/MDatabaseMetaDataHelper.cxx
@@ -53,7 +53,7 @@ bool MDatabaseMetaDataHelper::getTableStrings( OConnection* _pCon,
std::set<std::string> lists;
MorkParser* pMork = _pCon->getMorkParser("AddressBook");
pMork->retrieveLists(lists);
- for (::std::set<std::string>::iterator iter = lists.begin(); iter != lists.end(); ++iter) {
+ for (::std::set<std::string>::const_iterator iter = lists.begin(); iter != lists.end(); ++iter) {
OUString groupTableName = OStringToOUString((*iter).c_str(), RTL_TEXTENCODING_UTF8);
SAL_INFO("connectivity.mork", "add Table " << groupTableName);
@@ -65,7 +65,7 @@ bool MDatabaseMetaDataHelper::getTableStrings( OConnection* _pCon,
std::set<std::string> lists_history;
pMork = _pCon->getMorkParser("CollectedAddressBook");
pMork->retrieveLists(lists_history);
- for (::std::set<std::string>::iterator iter = lists_history.begin(); iter != lists_history.end(); ++iter) {
+ for (::std::set<std::string>::const_iterator iter = lists_history.begin(); iter != lists_history.end(); ++iter) {
OUString groupTableName = OStringToOUString((*iter).c_str(), RTL_TEXTENCODING_UTF8);
SAL_INFO("connectivity.mork", "add Table " << groupTableName);
diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index 98f69da2e889..65c8fbba3a7f 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -214,7 +214,7 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression
if (!Tables)
return -1;
MorkRowMap *Rows = nullptr;
- MorkRowMap::Map::iterator rowIter;
+ MorkRowMap::Map::const_iterator rowIter;
// Iterate all tables
for ( tableIter = Tables->map.begin(); tableIter != Tables->map.end(); ++tableIter )
@@ -240,7 +240,7 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression
}
MQueryHelperResultEntry* entry = new MQueryHelperResultEntry();
- for (MorkCells::iterator CellsIter = rowIter->second.begin();
+ for (MorkCells::const_iterator CellsIter = rowIter->second.begin();
CellsIter != rowIter->second.end(); ++CellsIter )
{
std::string column = xMork->getColumn(CellsIter->first);
@@ -252,7 +252,7 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression
}
::std::vector<bool> vector = entryMatchedByExpression(this, &expr, entry);
bool result = true;
- for (::std::vector<bool>::iterator iter = vector.begin(); iter != vector.end(); ++iter)
+ for (::std::vector<bool>::const_iterator iter = vector.begin(); iter != vector.end(); ++iter)
{
result = result && *iter;
}
@@ -337,13 +337,13 @@ sal_Int32 MQueryHelper::executeQuery(OConnection* xConnection, MQueryExpression
MQueryExpression::bool_cond condition = queryExpression->getExpressionCondition();
if (condition == MQueryExpression::OR) {
bool result = false;
- for (::std::vector<bool>::iterator iter = subquery_result.begin(); iter != subquery_result.end(); ++iter) {
+ for (::std::vector<bool>::const_iterator iter = subquery_result.begin(); iter != subquery_result.end(); ++iter) {
result = result || *iter;
}
resultVector.push_back(result);
} else if (condition == MQueryExpression::AND) {
bool result = true;
- for (::std::vector<bool>::iterator iter = subquery_result.begin(); iter != subquery_result.end(); ++iter) {
+ for (::std::vector<bool>::const_iterator iter = subquery_result.begin(); iter != subquery_result.end(); ++iter) {
result = result && *iter;
}
resultVector.push_back(result);
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index a05037d65e0d..96ae5e0cfafc 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -741,7 +741,7 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
if(xColumns.is())
{
OUString aColName, aParameterValue;
- OSQLColumns::Vector::iterator aIter = xColumns->get().begin();
+ OSQLColumns::Vector::const_iterator aIter = xColumns->get().begin();
sal_Int32 i = 1;
for(;aIter != xColumns->get().end();++aIter)
{
@@ -1080,8 +1080,8 @@ void OResultSet::fillRowData()
static bool matchRow( OValueRow& row1, OValueRow& row2 )
{
- OValueVector::Vector::iterator row1Iter = row1->get().begin();
- OValueVector::Vector::iterator row2Iter = row2->get().begin();
+ OValueVector::Vector::const_iterator row1Iter = row1->get().begin();
+ OValueVector::Vector::const_iterator row2Iter = row2->get().begin();
for ( ++row1Iter,++row2Iter; // the first column is the bookmark column
row1Iter != row1->get().end(); ++row1Iter,++row2Iter)
{
@@ -1168,7 +1168,7 @@ void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLExcep
}
OSortIndex::TKeyTypeVector eKeyType(m_aOrderbyColumnNumber.size());
- ::std::vector<sal_Int32>::iterator aOrderByIter = m_aOrderbyColumnNumber.begin();
+ ::std::vector<sal_Int32>::const_iterator aOrderByIter = m_aOrderbyColumnNumber.begin();
for ( ::std::vector<sal_Int16>::size_type i = 0; aOrderByIter != m_aOrderbyColumnNumber.end(); ++aOrderByIter,++i)
{
OSL_ENSURE((sal_Int32)m_aRow->get().size() > *aOrderByIter,"Invalid Index");
@@ -1227,7 +1227,7 @@ void SAL_CALL OResultSet::executeQuery() throw( ::com::sun::star::sdbc::SQLExcep
OKeyValue* pKeyValue = OKeyValue::createKeyValue((nRow));
- ::std::vector<sal_Int32>::iterator aIter = m_aOrderbyColumnNumber.begin();
+ ::std::vector<sal_Int32>::const_iterator aIter = m_aOrderbyColumnNumber.begin();
for (;aIter != m_aOrderbyColumnNumber.end(); ++aIter)
{
const ORowSetValue& value = getValue(nRow, *aIter);
@@ -1332,7 +1332,7 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow,
// look if we have such a select column
// TODO: would like to have a O(log n) search here ...
sal_Int32 nColumnPos = 0;
- for ( OSQLColumns::Vector::iterator aIter = _rxColumns->get().begin();
+ for ( OSQLColumns::Vector::const_iterator aIter = _rxColumns->get().begin();
aIter != _rxColumns->get().end();
++aIter,++nColumnPos
)
diff --git a/connectivity/source/drivers/mork/MorkParser.cxx b/connectivity/source/drivers/mork/MorkParser.cxx
index 5c6c33e32437..18ae66d34ed4 100644
--- a/connectivity/source/drivers/mork/MorkParser.cxx
+++ b/connectivity/source/drivers/mork/MorkParser.cxx
@@ -618,7 +618,7 @@ void MorkParser::retrieveLists(std::set<std::string>& lists)
#endif
MorkRowMap* rows = getRows( defaultListScope_, &TableIter->second );
if (!rows) return;
- for ( MorkRowMap::Map::iterator RowIter = rows->map.begin();
+ for ( MorkRowMap::Map::const_iterator RowIter = rows->map.begin();
RowIter != rows->map.end(); ++RowIter )
{
#ifdef VERBOSE
@@ -628,7 +628,7 @@ void MorkParser::retrieveLists(std::set<std::string>& lists)
std::cout << "\t\t\t\t Cells:\r\n";
#endif
// Get cells
- for ( MorkCells::iterator cellsIter = RowIter->second.begin();
+ for ( MorkCells::const_iterator cellsIter = RowIter->second.begin();
cellsIter != RowIter->second.end(); ++cellsIter )
{
if (cellsIter->first == 0xC1)
@@ -660,7 +660,7 @@ void MorkParser::getRecordKeysForListTable(std::string& listName, std::set<int>&
#endif
MorkRowMap* rows = getRows( 0x81, &TableIter->second );
if (!rows) return;
- for ( MorkRowMap::Map::iterator RowIter = rows->map.begin();
+ for ( MorkRowMap::Map::const_iterator RowIter = rows->map.begin();
RowIter != rows->map.end(); ++RowIter )
{
#ifdef VERBOSE
@@ -671,7 +671,7 @@ void MorkParser::getRecordKeysForListTable(std::string& listName, std::set<int>&
#endif
// Get cells
bool isListFound = false;
- for ( MorkCells::iterator cellsIter = RowIter->second.begin();
+ for ( MorkCells::const_iterator cellsIter = RowIter->second.begin();
cellsIter != RowIter->second.end(); ++cellsIter )
{
if (isListFound)
@@ -703,7 +703,7 @@ void MorkParser::dump()
std::cout << "=============================================\r\n\r\n";
//// columns dict
- for ( MorkDict::iterator iter = columns_.begin();
+ for ( MorkDict::const_iterator iter = columns_.begin();
iter != columns_.end(); ++iter )
{
std::cout << iter->first
@@ -716,7 +716,7 @@ void MorkParser::dump()
std::cout << "\r\nValues Dict:\r\n";
std::cout << "=============================================\r\n\r\n";
- for ( MorkDict::iterator iter = values_.begin();
+ for ( MorkDict::const_iterator iter = values_.begin();
iter != values_.end(); ++iter )
{
if (iter->first >= nextAddValueId_) {
@@ -734,25 +734,25 @@ void MorkParser::dump()
<< std::endl << std::endl;
//// Mork data
- for ( TableScopeMap::Map::iterator iter = mork_.map.begin();
+ for ( TableScopeMap::Map::const_iterator iter = mork_.map.begin();
iter != mork_.map.end(); ++iter )
{
std::cout << "\r\n Scope:" << iter->first << std::endl;
- for ( MorkTableMap::Map::iterator TableIter = iter->second.map.begin();
+ for ( MorkTableMap::Map::const_iterator TableIter = iter->second.map.begin();
TableIter != iter->second.map.end(); ++TableIter )
{
std::cout << "\t Table:"
<< ( ( int ) TableIter->first < 0 ? "-" : " " )
<< TableIter->first << std::endl;
- for (RowScopeMap::Map::iterator RowScopeIter = TableIter->second.map.begin();
+ for (RowScopeMap::Map::const_iterator RowScopeIter = TableIter->second.map.begin();
RowScopeIter != TableIter->second.map.end(); ++RowScopeIter )
{
std::cout << "\t\t RowScope:"
<< RowScopeIter->first << std::endl;
- for (MorkRowMap::Map::iterator RowIter = RowScopeIter->second.map.begin();
+ for (MorkRowMap::Map::const_iterator RowIter = RowScopeIter->second.map.begin();
RowIter != RowScopeIter->second.map.end(); ++RowIter )
{
std::cout << "\t\t\t Row Id:"
@@ -760,7 +760,7 @@ void MorkParser::dump()
<< RowIter->first << std::endl;
std::cout << "\t\t\t\t Cells:" << std::endl;
- for (MorkCells::iterator CellsIter = RowIter->second.begin();
+ for (MorkCells::const_iterator CellsIter = RowIter->second.begin();
CellsIter != RowIter->second.end(); ++CellsIter )
{
// Write ids
@@ -770,7 +770,7 @@ void MorkParser::dump()
<< CellsIter->second
<< " => ";
- MorkDict::iterator FoundIter = values_.find( CellsIter->second );
+ MorkDict::const_iterator FoundIter = values_.find( CellsIter->second );
if ( FoundIter != values_.end() )
{
// Write string values
diff --git a/connectivity/source/drivers/mork/mork_helper.cxx b/connectivity/source/drivers/mork/mork_helper.cxx
index d2779cf4c5b5..7ef3a5f76007 100644
--- a/connectivity/source/drivers/mork/mork_helper.cxx
+++ b/connectivity/source/drivers/mork/mork_helper.cxx
@@ -12,7 +12,7 @@ bool openAddressBook(const std::string& path)
return false;
}
const int defaultScope = 0x80;
- MorkTableMap::Map::iterator tableIter;
+ MorkTableMap::Map::const_iterator tableIter;
MorkTableMap *Tables = mork.getTables( defaultScope );
if ( Tables )
{
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
index 3e68f1321170..92f45cb2237c 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
@@ -73,7 +73,7 @@ namespace connectivity
IniSectionMap &mAllSection = parser.getAllSection();
IniSectionMap::iterator iBegin = mAllSection.begin();
- IniSectionMap::iterator iEnd = mAllSection.end();
+ IniSectionMap::const_iterator iEnd = mAllSection.end();
for(;iBegin != iEnd;++iBegin)
{
ini_Section *aSection = &(*iBegin).second;
@@ -166,7 +166,7 @@ namespace connectivity
ProductStruct &m_Product = m_ProductProfileList[index];
list.realloc(static_cast<sal_Int32>(m_Product.mProfileList.size()));
sal_Int32 i=0;
- for(ProfileList::iterator itor=m_Product.mProfileList.begin();
+ for(ProfileList::const_iterator itor=m_Product.mProfileList.begin();
itor != m_Product.mProfileList.end();
++itor)
{
diff --git a/connectivity/source/drivers/mysql/YDriver.cxx b/connectivity/source/drivers/mysql/YDriver.cxx
index 28d5a9d6e510..9125247b8db5 100644
--- a/connectivity/source/drivers/mysql/YDriver.cxx
+++ b/connectivity/source/drivers/mysql/YDriver.cxx
@@ -74,7 +74,7 @@ namespace connectivity
::comphelper::disposeComponent(m_xODBCDriver);
::comphelper::disposeComponent(m_xNativeDriver);
TJDBCDrivers::iterator aIter = m_aJdbcDrivers.begin();
- TJDBCDrivers::iterator aEnd = m_aJdbcDrivers.end();
+ TJDBCDrivers::const_iterator aEnd = m_aJdbcDrivers.end();
for ( ;aIter != aEnd;++aIter )
::comphelper::disposeComponent(aIter->second);
}
@@ -405,7 +405,7 @@ namespace connectivity
OMetaConnection* pConnection = reinterpret_cast<OMetaConnection*>(xTunnel->getSomething( OMetaConnection::getUnoTunnelImplementationId() ));
if ( pConnection )
{
- TWeakPairVector::iterator aEnd = m_aConnections.end();
+ TWeakPairVector::const_iterator aEnd = m_aConnections.end();
for (TWeakPairVector::iterator i = m_aConnections.begin(); aEnd != i; ++i)
{
if ( i->second.second == pConnection )
@@ -423,7 +423,7 @@ namespace connectivity
} // if ( xTunnel.is() )
if ( !xTab.is() )
{
- TWeakPairVector::iterator aEnd = m_aConnections.end();
+ TWeakPairVector::const_iterator aEnd = m_aConnections.end();
for (TWeakPairVector::iterator i = m_aConnections.begin(); aEnd != i; ++i)
{
Reference< XConnection > xTemp(i->first.get(),UNO_QUERY);
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index 7c089cfa3257..2fa488782308 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -200,7 +200,7 @@ SQLRETURN OResultSet::unbind(bool _bUnbindHandle)
if ( m_aBindVector.size() > 0 )
{
TVoidVector::iterator pValue = m_aBindVector.begin();
- TVoidVector::iterator pEnd = m_aBindVector.end();
+ TVoidVector::const_iterator pEnd = m_aBindVector.end();
for(; pValue != pEnd; ++pValue)
{
switch (pValue->second)
@@ -960,7 +960,7 @@ void SAL_CALL OResultSet::deleteRow( ) throw(SQLException, RuntimeException, st
if ( m_bRowDeleted )
{
TBookmarkPosMap::iterator aIter = m_aPosToBookmarks.begin();
- TBookmarkPosMap::iterator aEnd = m_aPosToBookmarks.end();
+ TBookmarkPosMap::const_iterator aEnd = m_aPosToBookmarks.end();
for (; aIter != aEnd; ++aIter)
{
if ( aIter->second == nPos )
@@ -1160,7 +1160,7 @@ Sequence<sal_Int8> OResultSet::impl_getBookmark( ) throw( SQLException, Runtim
{
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- TBookmarkPosMap::iterator aFind = ::std::find_if(m_aPosToBookmarks.begin(),m_aPosToBookmarks.end(),
+ TBookmarkPosMap::const_iterator aFind = ::std::find_if(m_aPosToBookmarks.begin(),m_aPosToBookmarks.end(),
[this] (const TBookmarkPosMap::value_type& bookmarkPos) {
return bookmarkPos.second == m_nRowPos;
});
@@ -1202,7 +1202,7 @@ sal_Bool SAL_CALL OResultSet::moveToBookmark( const Any& bookmark ) throw( SQLE
{
m_nCurrentFetchState = N3SQLFetchScroll(m_aStatementHandle,SQL_FETCH_BOOKMARK,0);
OTools::ThrowException(m_pStatement->getOwnConnection(),m_nCurrentFetchState,m_aStatementHandle,SQL_HANDLE_STMT,*this);
- TBookmarkPosMap::iterator aFind = m_aPosToBookmarks.find(aBookmark);
+ TBookmarkPosMap::const_iterator aFind = m_aPosToBookmarks.find(aBookmark);
if(aFind != m_aPosToBookmarks.end())
m_nRowPos = aFind->second;
else
@@ -1666,8 +1666,8 @@ bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nO
break;
case IResultSetHelper::BOOKMARK: // special case here because we are only called with position numbers
{
- TBookmarkPosMap::iterator aIter = m_aPosToBookmarks.begin();
- TBookmarkPosMap::iterator aEnd = m_aPosToBookmarks.end();
+ TBookmarkPosMap::const_iterator aIter = m_aPosToBookmarks.begin();
+ TBookmarkPosMap::const_iterator aEnd = m_aPosToBookmarks.end();
for (; aIter != aEnd; ++aIter)
{
if ( aIter->second == _nOffset )
@@ -1823,7 +1823,7 @@ void OResultSet::fillNeededData(SQLRETURN _nRet)
SWORD OResultSet::impl_getColumnType_nothrow(sal_Int32 columnIndex)
{
- ::std::map<sal_Int32,SWORD>::iterator aFind = m_aODBCColumnTypes.find(columnIndex);
+ ::std::map<sal_Int32,SWORD>::const_iterator aFind = m_aODBCColumnTypes.find(columnIndex);
if ( aFind == m_aODBCColumnTypes.end() )
aFind = m_aODBCColumnTypes.insert(::std::map<sal_Int32,SWORD>::value_type(columnIndex,OResultSetMetaData::getColumnODBCType(m_pStatement->getOwnConnection(),m_aStatementHandle,*this,columnIndex))).first;
return aFind->second;
diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx
index 5928eaeeec48..c7ab42428c80 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.cxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.cxx
@@ -235,7 +235,7 @@ void Connection::close() throw ( SQLException, RuntimeException, std::exception
m_settings.tables.clear();
m_settings.users.clear();
- for( WeakHashMap::iterator ii = m_myStatements.begin() ;
+ for( WeakHashMap::const_iterator ii = m_myStatements.begin() ;
ii != m_myStatements.end() ;
++ii )
{
@@ -427,9 +427,9 @@ public:
{
OSL_ENSURE(values.size() == acquired.size(), "pq_connection: cstr_vector values and acquired size mismatch");
std::vector<char*>::iterator pv = values.begin();
- std::vector<bool>::iterator pa = acquired.begin();
- const std::vector<char*>::iterator pve = values.end();
- for( ; pv < pve ; ++pv, ++pa )
+ std::vector<bool>::const_iterator pa = acquired.begin();
+ const std::vector<char*>::const_iterator pve = values.end();
+ for( ; pv != pve ; ++pv, ++pa )
if (*pa)
free(*pv);
}
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index e60043eff625..4d4ce9e78011 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1339,7 +1339,7 @@ sal_Int32 typeNameToDataType( const OUString &typeName, const OUString &typtype
// }
// base type
Statics &statics = getStatics();
- BaseTypeMap::iterator ii = statics.baseTypeMap.find( typeName );
+ BaseTypeMap::const_iterator ii = statics.baseTypeMap.find( typeName );
if( ii != statics.baseTypeMap.end() )
{
ret = ii->second;
@@ -1808,7 +1808,7 @@ static void columnMetaData2DatabaseTypeDescription(
}
- std::vector< std::vector<Any> >::iterator ii = vec.begin();
+ std::vector< std::vector<Any> >::const_iterator ii = vec.begin();
OUString lastTableOid;
sal_Int32 index = 0;
std::vector< std::vector< Any > > ret( vec.size() );
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 8a0056a7ecdc..60be95b46039 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -757,7 +757,7 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert(
{
OUString value;
OString columnName = OUStringToOString( keyColumnNames[i], pConnectionSettings->encoding );
- String2StringMap::iterator ii = namedValues.begin();
+ String2StringMap::const_iterator ii = namedValues.begin();
for( ; ii != namedValues.end() ; ++ii )
{
if( columnName.equalsIgnoreAsciiCase( ii->first ) )
@@ -776,7 +776,7 @@ Reference< XResultSet > getGeneratedValuesFromLastInsert(
getAutoValues( autoValues, connection, schemaName, tableName );
}
// this could mean, that the column is a default or auto value, check this ...
- String2StringMap::iterator j = autoValues.begin();
+ String2StringMap::const_iterator j = autoValues.begin();
for( ; j != autoValues.end() ; ++j )
{
if( columnName.equalsIgnoreAsciiCase( j->first ) )
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index bd923f3fafe0..d6a5102a429f 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -632,7 +632,7 @@ Reference< XDriver > OSDBCDriverManager::implGetDriverForURL(const OUString& _rU
const OUString sDriverFactoryName = m_aDriverConfig.getDriverFactoryName(_rURL);
EqualDriverAccessToName aEqual(sDriverFactoryName);
- DriverAccessArray::iterator aFind = ::std::find_if(m_aDriversBS.begin(),m_aDriversBS.end(),aEqual);
+ DriverAccessArray::const_iterator aFind = ::std::find_if(m_aDriversBS.begin(),m_aDriversBS.end(),aEqual);
if ( aFind == m_aDriversBS.end() )
{
// search all bootstrapped drivers
@@ -660,7 +660,7 @@ Reference< XDriver > OSDBCDriverManager::implGetDriverForURL(const OUString& _rU
if ( !xReturn.is() )
{
// no -> search the runtime drivers
- DriverCollection::iterator aPos = ::std::find_if(
+ DriverCollection::const_iterator aPos = ::std::find_if(
m_aDriversRT.begin(), // begin of search range
m_aDriversRT.end(), // end of search range
[&_rURL] (const DriverCollection::value_type& element) {
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 4f42b96b4301..188854702a33 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -1680,7 +1680,7 @@ void OSQLParseTreeIterator::setSelectColumnName(::rtl::Reference<OSQLColumns>& _
{
Reference< XPropertySet> xNewColumn;
- for ( OSQLTables::iterator aIter = m_pImpl->m_pTables->begin(); aIter != m_pImpl->m_pTables->end(); ++aIter )
+ for ( OSQLTables::const_iterator aIter = m_pImpl->m_pTables->begin(); aIter != m_pImpl->m_pTables->end(); ++aIter )
{
if ( !aIter->second.is() )
continue;