[FFmpeg-devel] [PATCH] Remove final semicolons from get_bits macros
Michael Niedermayer
michaelni
Sun Feb 21 03:40:09 CET 2010
On Sun, Feb 21, 2010 at 01:19:16AM +0000, M?ns Rullg?rd wrote:
> Mans Rullgard <mans at mansr.com> writes:
>
> > Some of the macros in get_bits.h include a final semicolon. This
> > removes them and adds semicolons as necessary where these macros
> > are invoked.
> >
> > Tested with all three readers.
> > ---
> > libavcodec/get_bits.h | 118 ++++++++++++++++++++++++------------------------
> > libavcodec/mjpegdec.c | 24 +++++-----
> > 2 files changed, 71 insertions(+), 71 deletions(-)
>
> ping
I prefer them with the semicolons as they are
They are blocks of code not single statements
This of course is arguably a bikeshed issue but to me
if(X)
MAKRO()
reminds me that i forgot something
while
if(X)
MAKRO();
looks like a function call
and then someone will argue that we need
do{
}while(0)
around every macro, which wouldnt change the code to the better
in terms of readability ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- 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-devel/attachments/20100221/626cf320/attachment.pgp>
More information about the ffmpeg-devel
mailing list