[FFmpeg-devel] [PATCH][COSMETICS] to merged QCELP decoder code

Michael Niedermayer michaelni
Sun Nov 16 00:29:57 CET 2008

On Sat, Nov 15, 2008 at 05:35:30PM -0300, Reynaldo H. Verdejo Pinochet wrote:
> Hi there Diego
> Diego Biurrun wrote:
> >> +    for(i=0; i<length; i++)
> > 
> > I think it's more readable with spaces around the operators.
> Totally subjective on my part but it gets tiresome
> when typing/programming. I'm quite used to put
> spaces after punctuation marks so the one after the
> ';' comes out naturally.

I also prefer "for(i=0; i<4; i++)" but i think ive said this already a
few times ...

> >> -    for (i = 0; i < 4; i++)
> >> -        if (gain[i]) {
> >> +    for(i=0; i<4; i++)
> >> +    {
> >> +        if(gain[i])
> >> +        {
> > 
> > Judging from what I've seen around here I think the preferred style
> > keeps the opening brace on the same line as the if/for.
> I find it easier to read if brackets are vertically
> aligned and I like the added almost-blank line
> provided by the lonely bracket separating the
> conditional statement. Of course I'd change it if
> its actually an style rule but if not forcibly mandated
> I'd naturally choose what better suits me as the file's
> author.

Iam "too old" to fight on brace placement as long as its not totally insane
(= gnu style) but thats not the case here.

For the record though our coding rules say
"The presentation is the one specified by 'indent -i4 -kr -nut'."
kr being Kernighan & Ritchie style, that puts { on the same line as if/for

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- 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/20081116/40cefa09/attachment.pgp>

More information about the ffmpeg-devel mailing list