[Development] White space / coding style patches welcome?

Oswald Buddenhagen oswald.buddenhagen at digia.com
Fri Mar 15 13:42:36 CET 2013


On Fri, Mar 15, 2013 at 04:16:46AM +0100, Axel Waggershauser wrote:
> 3) I came across a macro that had a semicolon at the end. I think this
> is sub-optimal. Without special support in the IDE (like for the
> Q_OBJECT macro) this leads to the following auto indented code:
> 
> ....RESOLVE_GL_FUNC(GenFramebuffersEXT)
> ............RESOLVE_GL_FUNC(GenRenderbuffersEXT)
> 
> instead of
> 
> ....RESOLVE_GL_FUNC(GenFramebuffersEXT);
> ....RESOLVE_GL_FUNC(GenRenderbuffersEXT);
> 
> Formally a non-whitespace change but in practice, it is.
> 
if you feel strong about it you can do that, but do every such change
separately with the respective maintainer added to the review. i expect
some rejections ...

> 5) About switch/case with blocks: I find the following indentation not
> particularly easy to read
> 
>     switch (type) {
>     case 1: {
>         int a;
>         return a;
>     }
>     default:
>         return 0;
>     }
> 
> probably not having a majority appeal but I think the following
> (QtCreator auto-indent-compatible) version would be better:
> 
>     switch (type) {
>     case 1: {
>         int a;
>         return a; }
>     default:
>         return 0;
>     }
> 
the latter.




More information about the Development mailing list