nl_create_if_one_liner
Category: Newline adding and removing options Type: boolean [false, true] Default: false
Whether to remove a newline in simple unbraced if statements, turning them into one-liners, as in 'if(b)\n i++;' => 'if(b) i++;'.
raw CPP code | nl_create_if_one_liner=false | nl_create_if_one_liner=true | nl nl_create_if_one_liner=true |
---|---|---|---|
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.