home  

nl_do_leave_one_liners

Properties

  Category: Newline adding and removing options
      Type: boolean [false, true]
   Default: false

Description

Don't split one-line do statements, as in 'do { b++; } while(...);'.

Examples

raw CPP code nl_do_leave_one_liners=false nl_do_leave_one_liners=true nl
nl_do_leave_one_liners=true
void f(){do a++;while(a>0);} void f(){do{a++;}while(a>0);} void f(){ do a++; while(a>0); } void f(){ do{a++;}while(a>0); } void f(){ do a++; while(a>0); } void f(){ do{a++;}while(a>0); } void f(){ doa++;while(a>0); } void f(){ do{a++;}while(a>0); }
 

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