I never gave much tought about my curly style, but now I realised I don't folow official style at all. To me both of these are wrong:
Code:
if (something) {
// do something
} else {
// don't do something
}
if (something)
{
// do something
}
else
{
// don't do something
}
Only this is acceptable:
Code:
if (something) {
// do something
}
else {
// don't do something
}
Two spaces before the opening brace, and else comes in the line after the closing brace. Oh, and functions and structures of course have their braces in separate lines.
Code:
functionname (param list)
{
// do something
}
If there are a lot of params to the function, then each goes into its on line.
Code:
functionname (
type1 param1,
type2 param2,
...
)
{
// do something
}
I realise all of this is a waste of time and totally useless. That's why I tried to be so precise & thorough.