Kaydet (Commit) 7222ffb7 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Rewrite some (trivial) assignments inside if/while conditions: connectivity

Change-Id: I67d4bb92db04b5103b98a2855ae6069a054f171b
üst bffac17a
......@@ -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',' )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment