[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Odd logic for deciding whether to display inline diffs in TMerge

From: Simon Large <simon_at_skirridsystems.co.uk>
Date: 2007-01-06 00:41:55 CET

Hi folks,

I was looking through the TMerge code to try to work out when inline
diffs are shown and I found this line in BaseView.cpp (line 1289 in r8347)

if ((diffcounts < maxcommon)||
     (smalldiffs==0)||((diffcounts/smalldiffs) > 1))

The last test divides 2 integers and compares with 1, and the previous
one avoids division by zero. Isn't it easier simply to compare the 2
integers, or am I missing something subtle?

if ((diffcounts < maxcommon)||(diffcounts > smalldiffs))

Simon

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Sat Jan 6 00:41:57 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.