Kaydet (Commit) 54cbd46d authored tarafından Matteo Casalin's avatar Matteo Casalin

Avoid assignment in complex if condition

Change-Id: Ibaff0eb54b67e946d07e5a626f5af04ac46132cc
üst 09baf615
......@@ -99,9 +99,11 @@ void SwWrongList::ClearList()
*/
bool SwWrongList::InWrongWord( sal_Int32 &rChk, sal_Int32 &rLn ) const
{
MSHORT nPos = GetWrongPos( rChk );
sal_Int32 nWrPos;
if( nPos < Count() && ( nWrPos = Pos( nPos ) ) <= rChk )
const MSHORT nPos = GetWrongPos( rChk );
if ( nPos >= Count() )
return false;
const sal_Int32 nWrPos = Pos( nPos );
if ( nWrPos <= rChk )
{
rLn = Len( nPos );
if( nWrPos + rLn <= rChk )
......
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