[Libreoffice] Cppcheck Same expression on both sides of '<'

Julien Nabet serval2412 at yahoo.fr
Tue May 17 07:13:24 PDT 2011


Le 17/05/2011 15:04, Michael Meeks a écrit :
> ...
>> nDownLst<  nDownLst
> 	So - this is the guy.
>
>      sal_Bool operator<( const SwDistance&  rTwo )
>           { return nMain<  rTwo.nMain || (
>
> 	So - we end up with: that equating to:
>
> 	nDownLst.nSub&&  nDownLst.nSub&&  nDownLst.nSub<  nDownLst.nSub
>
> 	Which seems like it is always false ;-) so lets just axe that
> comparison if indeed we have this code in the first checkin (in
> 2000) ;-)
>
It's commited and pushed on master. Hope it won't create a new bug ! :-) 
Perhaps it could be useful to have some "writer expert" eyes on it.

Julien.


More information about the LibreOffice mailing list