diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2016-03-28 19:17:45 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2016-03-28 18:39:16 +0000 |
commit | 2b60e64c18e16391ab7e04d1ded1119b8b5428ac (patch) | |
tree | 55686f1b2e0e065f9b333fb630613bce679c6cc2 /dbaccess/source/ui/dlg | |
parent | df47441ebe0eaf97c2ab7ce854323c18f4d1fe79 (diff) |
Use const_iterator when possible (whole dbaccess)
Change-Id: I3d10a7914353b384fc7a2195a70398869f675211
Reviewed-on: https://gerrit.libreoffice.org/23570
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'dbaccess/source/ui/dlg')
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionHelper.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexdialog.cxx | 10 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 380e4a39643c..fa86cea1b2b3 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -621,7 +621,7 @@ namespace dbaui Sequence< Any > aNewDirectoryAttributes(1); // loop - for ( ::std::vector< OUString >::reverse_iterator aLocalName = aToBeCreated.rbegin(); + for ( ::std::vector< OUString >::const_reverse_iterator aLocalName = aToBeCreated.rbegin(); aLocalName != aToBeCreated.rend(); ++aLocalName ) diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 7d9a00459492..22ca33fe3038 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -715,8 +715,8 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS // collect the translated property values for the relevant items PropertyValueSet aRelevantSettings; MapInt2String::const_iterator aTranslation; - ::std::vector< sal_Int32>::iterator aDetailsEnd = aDetailIds.end(); - for (::std::vector< sal_Int32>::iterator aIter = aDetailIds.begin();aIter != aDetailsEnd ; ++aIter) + ::std::vector< sal_Int32>::const_iterator aDetailsEnd = aDetailIds.end(); + for (::std::vector< sal_Int32>::const_iterator aIter = aDetailIds.begin();aIter != aDetailsEnd ; ++aIter) { const SfxPoolItem* pCurrent = _rSource.GetItem((sal_uInt16)*aIter); aTranslation = m_aIndirectPropTranslator.find(*aIter); @@ -746,7 +746,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS for (sal_Int32 i = 0; i < nCount; ++i, ++pInfo) { aSearchFor.Name = pInfo->Name; - PropertyValueSet::iterator aOverwrittenSetting = aRelevantSettings.find(aSearchFor); + PropertyValueSet::const_iterator aOverwrittenSetting = aRelevantSettings.find(aSearchFor); if (aRelevantSettings.end() != aOverwrittenSetting) { // the setting was present in the original sequence, and it is to be overwritten -> replace it if ( pInfo->Value != aOverwrittenSetting->Value ) diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index 8050cc8fbd49..56a63f7977af 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -290,8 +290,8 @@ namespace dbaui Image aPKeyIcon(ModuleRes( IMG_PKEYICON )); // fill the list with the index names m_pIndexList->Clear(); - Indexes::iterator aIndexLoop = m_pIndexes->begin(); - Indexes::iterator aEnd = m_pIndexes->end(); + Indexes::const_iterator aIndexLoop = m_pIndexes->begin(); + Indexes::const_iterator aEnd = m_pIndexes->end(); for (; aIndexLoop != aEnd; ++aIndexLoop) { SvTreeListEntry* pNewEntry = nullptr; @@ -395,7 +395,7 @@ namespace dbaui // they're iterators of the index collection, and thus they have changed when removing the index for (SvTreeListEntry* pAdjust = m_pIndexList->First(); pAdjust; pAdjust = m_pIndexList->Next(pAdjust)) { - Indexes::iterator aAfterInsertPos = m_pIndexes->find(m_pIndexList->GetEntryText(pAdjust)); + Indexes::const_iterator aAfterInsertPos = m_pIndexes->find(m_pIndexList->GetEntryText(pAdjust)); OSL_ENSURE(aAfterInsertPos != m_pIndexes->end(), "DbaIndexDialog::OnNewIndex: problems with on of the entries!"); pAdjust->SetUserData(reinterpret_cast< void* >(sal_Int32(aAfterInsertPos - m_pIndexes->begin()))); } @@ -465,7 +465,7 @@ namespace dbaui // they're iterators of the index collection, and thus they have changed when removing the index for (SvTreeListEntry* pAdjust = m_pIndexList->First(); pAdjust; pAdjust = m_pIndexList->Next(pAdjust)) { - Indexes::iterator aAfterDropPos = m_pIndexes->find(m_pIndexList->GetEntryText(pAdjust)); + Indexes::const_iterator aAfterDropPos = m_pIndexes->find(m_pIndexList->GetEntryText(pAdjust)); OSL_ENSURE(aAfterDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: problems with on of the remaining entries!"); pAdjust->SetUserData(reinterpret_cast< void* >(sal_Int32(aAfterDropPos - m_pIndexes->begin()))); } @@ -717,7 +717,7 @@ namespace dbaui { if (m_pPreviousSelection) { - Indexes::iterator aPreviouslySelected = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(m_pPreviousSelection->GetUserData()); + Indexes::const_iterator aPreviouslySelected = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(m_pPreviousSelection->GetUserData()); if (!implSaveModified()) return false; diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index d66e76db7678..31828232ce46 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -171,7 +171,7 @@ namespace dbaui IndexFields::const_iterator aSource = m_aFields.begin(); IndexFields::const_iterator aSourceEnd = m_aFields.end(); IndexFields::iterator aDest = _rFields.begin(); - for (; aSource < aSourceEnd; ++aSource) + for (; aSource != aSourceEnd; ++aSource) if (!aSource->sFieldName.isEmpty()) { *aDest = *aSource; |