Skip to content

Latest commit

 

History

History
41 lines (36 loc) · 367 Bytes

File metadata and controls

41 lines (36 loc) · 367 Bytes

{{< Needed >}}

Move line into all if/else branches

Duplicate a line outside an if/else structure to be included:

if(a)
{
  // somecode
}
else if (b)
{
  // somecode  
}
else
{
  // somecode
}
// last line

Becomes:

if(a)
{
  // somecode
  // last line
}
else if (b)
{
  // somecode  
  // last line
}
else
{
  // somecode
  // last line
}