• Create Account

### #ActualTom KQT

Posted 25 April 2013 - 01:54 AM

I use both styles, but I am still consistent in it, although it may sound weird

I use the following only for class definitions, functions definitions, namespaces and these sorts of "top level" blocks:

void myFunction()
{
int a = 1;
}


And the following for if, for, while and other similar blocks:

if (a == b) {
a++;
b--;
}


And btw, for one-line if blocks i usually use this:

if (a == b)
a++;


### #1Tom KQT

Posted 25 April 2013 - 01:53 AM

I use both styles, but I am still consistent in it, although it may sound weird

I use the following only for class definitions, functions definitions, namespaces and these sorts of "top level" blocks:

void myFunction()
{
int a = 1;
}


And the following for if, for, while and other similar blocks:

if (a == b) {
a++;
b--;
}


And btw, for one-line if blocks i usually don use this:

if (a == b)
a++;


PARTNERS