home  

mod_move_case_break

Properties

  Category: Code modifying options (non-whitespace)
      Type: boolean [false, true]
   Default: false

Description

Whether to move a 'break' that appears after a fully braced 'case' before
the close brace, as in 'case X: { ... } break;' => 'case X: { ... break; }'.

Examples

raw CPP code mod_move_case_break=false mod_move_case_break=true
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.