Rewrite some (trivial) assignments inside if/while conditions: connectivity
Change-Id: I67d4bb92db04b5103b98a2855ae6069a054f171b
This commit is contained in:
parent
bffac17a82
commit
7222ffb79c
@ -274,8 +274,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
|
||||
}
|
||||
else // no extension, filter myself
|
||||
{
|
||||
bool bErg = false;
|
||||
do
|
||||
for (;;)
|
||||
{
|
||||
if (aURL.getExtension().isEmpty())
|
||||
{
|
||||
@ -287,12 +286,13 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if ( ( bErg = xResultSet->next() ) )
|
||||
if ( !xResultSet->next() )
|
||||
{
|
||||
aName = xRow->getString(1);
|
||||
aURL.SetSmartURL(aName);
|
||||
break;
|
||||
}
|
||||
} while (bErg);
|
||||
aName = xRow->getString(1);
|
||||
aURL.SetSmartURL(aName);
|
||||
}
|
||||
}
|
||||
if(bNewRow)
|
||||
{
|
||||
|
@ -429,7 +429,8 @@ OUString OResultSet::makeNumericString(const sal_Int32 nColumnIndex)
|
||||
template <typename T>
|
||||
T OResultSet::retrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT nType)
|
||||
{
|
||||
if ((m_bWasNull = isNull(nColumnIndex)))
|
||||
m_bWasNull = isNull(nColumnIndex);
|
||||
if (m_bWasNull)
|
||||
return T();
|
||||
|
||||
if ((m_pSqlda->sqlvar[nColumnIndex-1].sqltype & ~1) == nType)
|
||||
@ -622,7 +623,8 @@ T OResultSet::safelyRetrieveValue(const sal_Int32 nColumnIndex, const ISC_SHORT
|
||||
checkColumnIndex(nColumnIndex);
|
||||
checkRowIndex();
|
||||
|
||||
if ((m_bWasNull = isNull(nColumnIndex)))
|
||||
m_bWasNull = isNull(nColumnIndex);
|
||||
if (m_bWasNull)
|
||||
return T();
|
||||
|
||||
return retrieveValue< T >(nColumnIndex, nType);
|
||||
|
@ -870,7 +870,8 @@ css::uno::Sequence< sal_Int32 > string2intarray( const OUString & str )
|
||||
break;
|
||||
if ( start == strlen)
|
||||
return ret;
|
||||
} while ( (c=str.iterateCodePoints(&start)) );
|
||||
c=str.iterateCodePoints(&start);
|
||||
} while ( c );
|
||||
do
|
||||
{
|
||||
if (!iswdigit(c))
|
||||
@ -878,7 +879,8 @@ css::uno::Sequence< sal_Int32 > string2intarray( const OUString & str )
|
||||
if ( start == strlen)
|
||||
return ret;
|
||||
digits += OUString(&c, 1);
|
||||
} while ( (c = str.iterateCodePoints(&start)) );
|
||||
c = str.iterateCodePoints(&start);
|
||||
} while ( c );
|
||||
vec.push_back( digits.toInt32() );
|
||||
do
|
||||
{
|
||||
@ -886,7 +888,8 @@ css::uno::Sequence< sal_Int32 > string2intarray( const OUString & str )
|
||||
break;
|
||||
if ( start == strlen)
|
||||
return ret;
|
||||
} while ( (c=str.iterateCodePoints(&start)) );
|
||||
c = str.iterateCodePoints(&start);
|
||||
} while ( c );
|
||||
if ( c == L'}' )
|
||||
break;
|
||||
if ( str.iterateCodePoints(&start) != L',' )
|
||||
|
Loading…
x
Reference in New Issue
Block a user