Michel Fortin wrote:
Hum two suggestions. Sometime I want fall-through when I write a switch, but I always make it clear that it isn't a bug by writing the intent in a short comment:

    switch (c) {
        case 1:
            blah();
            break;
        case 2:
            blah();
            // fallthrough
        case 3:
            blah();
            break;
    }

I just use whitespace:

     switch (c) {
         case 1:
             blah();
             break;

         case 2:
             blah();
         case 3:
             blah();
             break;
     }

Works fine.

Reply via email to