Kaydet (Commit) 721024be authored tarafından Matteo Casalin's avatar Matteo Casalin

Avoid else branches after return statements

Change-Id: Ia64d2b6c94c8ead92a2f44a3c554acae5a54917f
üst 6753a14a
......@@ -51,16 +51,14 @@ sal_uInt16 SwEditShell::GetFldTypeCount(sal_uInt16 nResId, bool bUsed ) const
{
if(!bUsed)
return nSize;
else
sal_uInt16 nUsed = 0;
for ( sal_uInt16 i = 0; i < nSize; i++ )
{
sal_uInt16 nUsed = 0;
for ( sal_uInt16 i = 0; i < nSize; i++ )
{
if(IsUsed(*(*pFldTypes)[i]))
nUsed++;
}
return nUsed;
if(IsUsed(*(*pFldTypes)[i]))
nUsed++;
}
return nUsed;
}
// all types with the same ResId
......@@ -84,20 +82,18 @@ SwFieldType* SwEditShell::GetFldType(sal_uInt16 nFld, sal_uInt16 nResId, bool bU
{
if(!bUsed)
return (*pFldTypes)[nFld];
else
sal_uInt16 i, nUsed = 0;
for ( i = 0; i < nSize; i++ )
{
sal_uInt16 i, nUsed = 0;
for ( i = 0; i < nSize; i++ )
if(IsUsed(*(*pFldTypes)[i]))
{
if(IsUsed(*(*pFldTypes)[i]))
{
if(nUsed == nFld)
break;
nUsed++;
}
if(nUsed == nFld)
break;
nUsed++;
}
return i < nSize ? (*pFldTypes)[i] : 0;
}
return i < nSize ? (*pFldTypes)[i] : 0;
}
sal_uInt16 nIdx = 0;
......
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