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

Re: [PATCH] Get-Locations TNG Rev. 26 - Using the New Specification

From: Alon Ziv <alonz_at_nolaviz.org>
Date: 2004-04-29 22:13:05 CEST

On Thursday 29 April 2004 20:22, Shlomi Fish wrote:
> > + if (a < b)
> > + {
> > + return 1;
> > + }
> > + else if (a > b)
> > + {
> > + return (-1);
> > + }
> > + else
> > + {
> > + return 0;
> > + }
> >
> > Twelve lines where one would do:
> >
> > return (a < b) ? 1 : (a > b) ? -1 : 0;
>
> OK.
>
Even better (IMO) would be just "b - a" (considering this is just used as a
comparison function for qsort)...

        -az

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 29 22:19:19 2004

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

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