SourceForge has been redesigned. Learn more.
Close

#255 align-reference=name doesn't work everywhere

closed-fixed
None
2015-01-03
2013-12-21
Guy Maurel
No

astyle --align-reference=name UND-sign.cpp

within foreach (..) the &-sign is not move to name.

1 Attachments

Discussion

  • Guy Maurel

    Guy Maurel - 2013-12-29

    The problem is created from the comma "," after the word "localFlag" as the function ASFormatter::isArrayOperator() at lines
    6405│ // check for characters that indicate an operator
    6406│ if (currentLine[nextNum] == ','
    6407│ || currentLine[nextNum] == '}'
    6408│ || currentLine[nextNum] == ')'
    6409│ || currentLine[nextNum] == '(')
    6410│ return true;

    returns "TRUE"

     
  • Underground78

    Underground78 - 2014-02-18

    Hello,

    The problem also exists for lambda functions' arguments:

        int bar = 42;
        auto test = [&](int & foo) {
            foo *= bar;
        };
    

    Edit: Sorry for the triple posts, SF was lagging as hell and I thought the comment hadn't been posted.

     
    Last edit: Underground78 2014-02-18
  • Underground78

    Underground78 - 2014-02-18
     
    Last edit: Underground78 2014-02-18
  • Underground78

    Underground78 - 2014-02-18
     
    Last edit: Underground78 2014-02-18
  • Jim Pattee

    Jim Pattee - 2014-04-27
    • status: open --> open-fixed
    • assigned_to: Jim Pattee
    • Priority: 5 --> 7
     
  • Jim Pattee

    Jim Pattee - 2014-11-20
    • Status: open-fixed --> closed-fixed
     

Log in to post a comment.