[FFmpeg-devel] [PATCH] RoQ encoder

Måns Rullgård mans
Sun May 6 00:48:43 CEST 2007


Diego Biurrun <diego at biurrun.de> writes:

> On Sat, May 05, 2007 at 06:47:54PM +0200, Michael Niedermayer wrote:
>> 
>> On Sat, May 05, 2007 at 10:57:50AM +0200, Diego Biurrun wrote:
>> > > +    for(i=0;i<MAX_DPCM;i++)
>> > > +    {
>> > > +        if(diff < 0)
>> > > +            diff = -diff;
>> > > +        if(diff2 < 0)
>> > > +            diff2 = -diff2;
>> > > +    }
>> > 
>> > Please put a space between for/if and (, makes things more readable.
>> 
>> i think this is getting too nitpickish
>> i mean yes you can improve
>> 
>> for(i=0;i<MAX_DPCM;i++)
>> 
>> for example:
>> 
>> for(i=0; i<MAX_DPCM; i++)
>> 
>> is more readable IMHO but iam very afraid this could end in a coding style
>> flamewar
>
> No, not another flamewar please.
>
> I wouldn't have mentioned this by itself, but since the patch was in for
> another revision anyway...
>
> IMO the most readable variant is
>
>   for ( i = 0;  i < MAX_DPCM;  i++ )
>
> but no, I won't insist in any way ;)

Good, because I can't stand that style.  This is how it should be:

  for (i = 0; i < MAX_DPCM; i++)

Note the lack of spaces immediately inside the parenthesis.

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-devel mailing list