diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2018-03-10 14:49:40 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2018-03-10 16:52:53 +0100 |
commit | ba98f6e3e4dbfc23474e13d59bb08c618ee8c4e5 (patch) | |
tree | 31e69726116d87a088d561cadae96bf2e08d07a4 /dbaccess/source/ui/relationdesign | |
parent | 351043e5120470ff4d382f01e4c2f215ba84ef59 (diff) |
Modernize a bit more dbaccess (part2)
mainly by using for-range loops but also by simplifying some simple algo
Change-Id: If5ce6d901761db2b872a99e6de0eb6d2f098df99
Reviewed-on: https://gerrit.libreoffice.org/51044
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'dbaccess/source/ui/relationdesign')
-rw-r--r-- | dbaccess/source/ui/relationdesign/RTableConnectionData.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx index e7a590c85866..8c4a56d41348 100644 --- a/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx +++ b/dbaccess/source/ui/relationdesign/RTableConnectionData.cxx @@ -337,17 +337,17 @@ xKey.clear(); xColumn->getPropertyValue(PROPERTY_NAME) >>= sName; xColumn->getPropertyValue(PROPERTY_RELATEDCOLUMN) >>= sRelatedColumn; - OConnectionLineDataVec::const_iterator aIter = m_vConnLineData.begin(); - OConnectionLineDataVec::const_iterator aEnd = m_vConnLineData.end(); - for(;aIter != aEnd;++aIter) + bool bFoundElem = false; + for (auto const& elem : m_vConnLineData) { - if( (*aIter)->GetSourceFieldName() == sName - && (*aIter)->GetDestFieldName() == sRelatedColumn ) + if( elem->GetSourceFieldName() == sName + && elem->GetDestFieldName() == sRelatedColumn ) { + bFoundElem = true; break; } } - if ( aIter == m_vConnLineData.end() ) + if (!bFoundElem) break; } if ( pIter == pEnd ) |