[FFmpeg-devel] [PATCH] doc/developer: update style guidelines to include for loops with declarations

Clément Bœsch u at pkh.me
Fri Nov 10 09:19:16 EET 2017


On Fri, Nov 10, 2017 at 12:18:07AM +0100, Aurelien Jacobs wrote:
[...]
> > >   Also, allowing this but not the mixed statements and declarations means
> > >   this is a style decision and not a technical one anymore.
> 
> Allowing limiting the scope of a variable to a loop seems like a
> technical decision to me, but I understand that some consider it more
> of a style decision.
> 

What I meant by that is that currently the for (int ..) form is prevented
by style but also technical argument (compiler compatibility). If you
remove the technical argument by breaking the compiler compatibility of
such form, what remains is only a style choice to make between mixed
stat/decl and for (int ...); AFAIK there is no difference for a compiler
between the two.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171110/a744dfec/attachment.sig>


More information about the ffmpeg-devel mailing list