Menu

TextFX: Reindent C++ code problem

Anonymous
2009-04-23
2012-11-14
  • Anonymous

    Anonymous - 2009-04-23

    I noticed a problem with the TextFX plugin. When you tell click "Reindent C++" on the menu, it doesn't properly indent the switch statment. It considers the "break;" line as a normal statement. What I mean is that it does this:

    switch(a){
          case 1:
                a=2;
                break;

          case 2:
                a=1;
                break;
    }

    instead of this:

    switch(a){
          case 1:
                a=2;
          break;

          case 2:
                a=1;
          break;
    }

    Those who write C/C++ code will understand what I mean.

     
    • Anonymous

      Anonymous - 2009-04-23

      !!!!-- This is a re-write of my post above. --!!!!

      I noticed a problem with the TextFX plugin. When you tell click "Reindent C++" on the menu, it doesn't properly indent the switch statment. It considers the "break;" line as a normal statement. The "-" represent indents (spaces)What I mean is that it does this:

      switch(a){
      ---- case 1:
      -------- a=2;
      -------- break;

      ---- case 2:
      -------- a=1;
      -------- break;
      }

      instead of this:

      switch(a){
      ---- case 1:
      -------- a=2;
      ---- break;

      ---- case 2:
      -------- a=1;
      ---- break;
      }

      Those who write C/C++ code will understand what I mean.

       
MongoDB Logo MongoDB