[pulseaudio-discuss] Suggested coding style change for functions

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Fri Sep 20 02:04:16 PDT 2013


On Thu, 2013-09-19 at 23:26 +0200, David Henningsson wrote:
> Our current coding style currently says this:
> 
> void function(int foo) {
>     bar();
> }
> 
> I suggest we change it to this:
> 
> void function(int foo)
> {
>     bar();
> }
> 
> To clarify, this only applies to functions, not to if statements,
> structs or anything else.
> 
> This is because the latter is more standard: All of the other projects
> I've recently worked with (e g Linux kernel, Gnome, FluidSynth) has the
> opening brace on a separate line.
> 
> Having coding style similar to other projects allow people such as
> myself to easier move between projects and focus on what's important:
> features and fixing bugs, rather than having to remember several
> different coding styles.

This is a good enough argument for me, so I'm not against this change.

-- 
Tanu



More information about the pulseaudio-discuss mailing list