On 6/16/10 3:49 PM, "papu...@gmail.com" <papu...@gmail.com> wrote:
> Reviewers: carl.d.sorensen_gmail.com, > > Message: > I would have split it into chunks, but my main concern was warnings, > which was present in most of the files. Most of the committed files only > contain casts. > Reviewing will take about 1-2 hours, I guess. > > I have checked in the code how casting works and I have used the int(), > mostly , without the space (could have used int() or static_cast<int>(), > but this was the most aesthetic to me). Must have found a wrong example. > Should I correct it? Stroustrup mentions that you can do cast as (type-name) expression or simple-type-name ( expression-list ) I prefer to always use (type-name) expression because the same syntax applies to both simple types and other types. I think that's what I have mostly seen in the lilypond codebase. But as far as I know, this isn't a standard. > I don't really like the extra space decision, this way "while ()", "if > ()" and "clear ()" all look the same, while only the last one is a > function, the rest are not. And it even occupies too much space, but if > that's the standard, that's how I'll do it :). It is the standard. And submitting a patch is not the time to change the standard. > (Eclipse has a pretty > good code formatter, someone might want to run it (or maybe > http://astyle.sourceforge.net/, haven't tried it, though) on the whole > project to beautify the code automagically) We've had discussions about various formatters. You can look for them on -devel. And in fact, there is a lilypond code formatter. (see http://lilypond.org/doc/v2.13/Documentation/contributor/indentation) However, the diffs are so large that we are unwilling to run everything through it. See http://thread.gmane.org/gmane.comp.gnu.lilypond.devel/25397 The current recommendation for *indentation* is to use emacs, as shown in the CG reference above. Thanks, Carl _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel