Date: prev next · Thread: first prev next last
2014 Archives by date, by thread · List index


Hello,

Cppcheck reported this:
vcl/source/gdi/impimage.cxx
300     multiCondition  style   Expression is always false because 'else if'
condition matches previous condition at line 298.

Indeed we have:
    296                 else
    297                 {
    298                     if( aTmpBmpEx.IsAlpha() )
    299                         aTmpBmpEx = BitmapEx( aTmpBmp,
aTmpBmpEx.GetAlpha() );
    300                     else if( aTmpBmpEx.IsAlpha() )
    301                         aTmpBmpEx = BitmapEx( aTmpBmp,
aTmpBmpEx.GetMask() );
    302                 }
see
http://opengrok.libreoffice.org/xref/core/vcl/source/gdi/impimage.cxx#298

Should the else if be:
else if( aTmpBmpEx.IsTransparent())
?

Julien




--
View this message in context: 
http://nabble.documentfoundation.org/Cppcheck-reports-else-if-condition-matches-previous-condition-vcl-tp4104270.html
Sent from the Dev mailing list archive at Nabble.com.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.