home  

nl_brace_else

Properties

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

Description

Add or remove newline between '}' and 'else'.

Examples

raw CPP code nl_brace_else=ignore nl_brace_else=add nl_brace_else=remove nl_brace_else=force nl
nl_brace_else=force
void fnl1(){if(a)b();else c();} void fnl2(){if(a){b();}else{c();}} void fnl1(){ if(a) b(); else c(); } void fnl2(){ if(a){b();}else{c();} } void fnl1(){ if(a) b(); else c(); } void fnl2(){ if(a){b();} else{c();} } void fnl1(){ if(a) b(); else c(); } void fnl2(){ if(a){b();}else{c();} } void fnl1(){ if(a) b(); else c(); } void fnl2(){ if(a){b();} else{c();} } void fnl1(){ if(a) b();elsec(); } void fnl2(){ if(a){b();} else{c();} }
 

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