vcl/source/filter/ixpm/xpmread.cxx | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)
New commits: commit a8f67df121a16c72c521d91c3d9268089f961d99 Author: Caolán McNamara <caol...@redhat.com> Date: Tue Jan 24 09:55:22 2017 +0000 return early Change-Id: Ic95f968bcd7acdde170a1128a512f03f77e334cf diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx index 6193bbb..9ca2f59 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.
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits