Skip to content

Instantly share code, notes, and snippets.

@MarkyC
Created February 22, 2014 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarkyC/9163893 to your computer and use it in GitHub Desktop.
Save MarkyC/9163893 to your computer and use it in GitHub Desktop.
Example Showing single line if versus using braces
void foo(int a, int b, int c) {
if ( (0 == a) || (0 == b) || (0 == c) ) throw new Exception();
...
}
VS
void foo (int a, int b, int c) {
if ( (0 == a) || (0 == b) || (0 == c) ) {
throw new Exception();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment