On 2009-08-04 01:29, Diego Biurrun wrote: > On Mon, Aug 03, 2009 at 07:03:43PM -0400, Ronald S. Bultje wrote: >> On Mon, Aug 3, 2009 at 7:00 PM, Diego Biurrun<[email protected]> wrote: >>> On Mon, Aug 03, 2009 at 07:37:42PM +0200, cmcq wrote: >>>> Use "if { y } else z" style >>> Please do not use idiosyncratic styles, stick to K&R. >> If you have: >> >> if (x) >> a >> else >> b >> >> Michael will ask to add {} atop (but not at the bottom), so: >> >> if (x) { >> a >> } else >> b > > I only remember him asking for > > if (x) { > a > } else { > b > } >
the goal is to limit diffs on future modifications. if you have to add an else if clause, it is the same whether you have the braces for the else clause or not. If it was just a question of small diff output when adding things along with 'b' above, we would always use braces. anyway, the solution Colin used is 5 chars less ! that's disk space saved ;) Ben _______________________________________________ FFmpeg-soc mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc
