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

Michael Meeks michael.meeks at novell.com
Tue May 17 06:04:30 PDT 2011


Hi Julien,

On Mon, 2011-05-16 at 19:08 +0200, Julien Nabet wrote:
> Here a line I get in cppcheck (updated today) :
> [source/core/layout/flycnt.cxx:1194] -> 
> [source/core/layout/flycnt.cxx:1194]: (style) Same expression on both 
> sides of '<'.

	What fun :-)

> I checked the file git history, it's there since the beginning.
>                  while ( pDownFrm && ( ( nDown.nMain != LONG_MAX && 

> 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) ;-)

	Thanks !

		Michael.

-- 
 michael.meeks at novell.com  <><, Pseudo Engineer, itinerant idiot




More information about the LibreOffice mailing list