clang-format removes new lines in array definition with designators

前端 未结 2 2055
一个人的身影
一个人的身影 2021-01-22 11:48

I like to define my array values with a designator, when possible:

enum Mode {
    NONE,
    SPLIT_FILES,
    SINGLE_FILE,
    INVALID
};

const std::string Mode         


        
2条回答
  •  天涯浪人
    2021-01-22 12:14

    Comments on every line also works.

    enum Mode {
      NONE,         // Comments
      SPLIT_FILES,  // On
      SINGLE_FILE,  // Every
      INVALID       // Line
    };
    

提交回复
热议问题