summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-08-31 23:04:00 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-09-12 14:18:50 +0200
commitf4c300eae4e9aaaec9e5d1f478ad35161ede2761 (patch)
tree0f5f18e2376fef8826a1d053e1f0bd35f08cf940 /dbaccess
parentb2e6bb75e03386b958d5e7c066e7768e43726f47 (diff)
Reduce scope by early bail out
Change-Id: Ia4e1763cc4d70197342be4e5caf6d5c14cd34c80
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/misc/WTypeSelect.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 99ba3559970d..bc20e9604398 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -372,15 +372,14 @@ void OWizTypeSelectList::dispose()
bool OWizTypeSelectList::IsPrimaryKeyAllowed() const
{
const sal_Int32 nCount = GetSelectEntryCount();
- sal_Int32 j;
- for( j = 0; m_bPKey && j < nCount; ++j )
+ for( sal_Int32 j = 0; m_bPKey && j < nCount; ++j )
{
OFieldDescription* pField = static_cast<OFieldDescription*>(GetEntryData(GetSelectEntryPos(j)));
if(!pField || pField->getTypeInfo()->nSearchType == ColumnSearch::NONE)
- break;
+ return true;
}
- return j == nCount;
+ return false;
}
void OWizTypeSelectList::setPrimaryKey(OFieldDescription* _pFieldDescr, sal_uInt16 _nPos, bool _bSet)