[FFmpeg-cvslog] r10500 - trunk/libavcodec/vc1.c
Mike Melanson
mike
Mon Sep 17 23:01:24 CEST 2007
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.
--
-Mike Melanson
More information about the ffmpeg-cvslog
mailing list