diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-24 09:55:22 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-24 09:56:12 +0000 |
commit | a8f67df121a16c72c521d91c3d9268089f961d99 (patch) | |
tree | 7c0b9a2ab5994dd558136533b85838c8d9627fed /vcl | |
parent | d63b767c699e1658516c2a4514e4f0461ae29dd2 (diff) |
return early
Change-Id: Ic95f968bcd7acdde170a1128a512f03f77e334cf
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/filter/ixpm/xpmread.cxx | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx index 6193bbbb411a..9ca2f59fd9d8 100644 --- a/vcl/source/filter/ixpm/xpmread.cxx +++ b/vcl/source/filter/ixpm/xpmread.cxx @@ -527,31 +527,26 @@ sal_uLong XPMReader::ImplGetULONG( sal_uLong nPara ) bool XPMReader::ImplCompare( sal_uInt8 const * pSource, sal_uInt8 const * pDest, sal_uLong nSize, sal_uLong nMode ) { - bool bRet = true; - if ( nMode == XPMCASENONSENSITIVE ) { for ( sal_uLong i = 0; i < nSize; i++ ) { if ( ( pSource[i]&~0x20 ) != ( pDest[i]&~0x20 ) ) { - bRet = false; - break; + return false; } } + return true; } - else + + for ( sal_uLong i = 0; i < nSize; i++ ) { - for ( sal_uLong i = 0; i < nSize; i++ ) + if ( pSource[i] != pDest[i] ) { - if ( pSource[i] != pDest[i] ) - { - bRet = false; - break; - } + return false; } } - return bRet; + return true; } // ImplGetPara tries to retrieve nNumb (0...x) parameters from mpStringBuf. |