[FFmpeg-cvslog] r10500 - trunk/libavcodec/vc1.c

Michael Niedermayer michaelni
Mon Sep 17 23:42:27 CEST 2007


On Mon, Sep 17, 2007 at 02:01:24PM -0700, Mike Melanson wrote:
> The Wanderer wrote:
> > They may not be necessary semantically, but I for one do not know
> > operator precedence well enough to be able to tell at a glance whether
> > the version without them would perform the ternary conditional before or
> > after the equality comparison. The addition of the parentheses makes it
> > plain, and does not hurt readability in the aesthetic sense IMO.
> > 
> > I am certainly not the only person who would be so unable, and though I
> > am unlikely to contribute actual code anytime this decade, there is
> > nothing which says that some who might are not in the same boat. In
> > addition, making the code more comprehensible even to people who do not
> > contribute is helpful for (at the least) cases where people would be
> > told to RTFS.
> Thanks for articulating this better than I could. Aside from "*/+-" I
> can never remember operator precedence rules (which I think change
> subtly between different languages). That's why I like parens around ops
> that deviate from the 4 basic math operators.

so you plan to write:
a = (b + (c[5]));

instead of

a = b + c[5];

as that could be

((a = b) + c)[5];



Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20070917/8454e6c3/attachment.pgp>

More information about the ffmpeg-cvslog mailing list