home  

nl_switch_brace

Properties

  Category: Newline adding and removing options
      Type: multiple (ignore add remove force)
   Default: ignore

Description

Add or remove newline between 'switch' and '{'.

Examples

raw CPP code nl_switch_brace=ignore nl_switch_brace=add nl_switch_brace=remove nl_switch_brace=force nl
nl_switch_brace=force
void f(){switch(a){case 1:a++;break;case -1:a--;case 123:a--;break;default:a=0;}} void f(){ switch(a){case 1: a++; break; case -1: a--; case 123: a--; break; default: a=0;} } void f(){ switch(a) { case 1: a++; break; case -1: a--; case 123: a--; break; default: a=0; } } void f(){ switch(a){ case 1: a++; break; case -1: a--; case 123: a--; break; default: a=0; } } void f(){ switch(a) { case 1: a++; break; case -1: a--; case 123: a--; break; default: a=0; } } void f(){ switch(a) { case 1: a++;break;case -1: a--;case 123: a--;break;default: a=0; } }
 

Not the best code for this option? See how to improve the .uds file used to generate these examples.