admin管理员组

文章数量:1297047

I'm using the vscode extension C/C++ and in the extension setting I've set Clang_format_style as:

{
    BasedOnStyle: Google,
    SortIncludes: false,
    IndentWidth: 4,
    MaxEmptyLinesToKeep: 3,
    ColumnLimit: 0,
    KeepEmptyLinesAtTheStartOfBlocks: true,
    AlignAfterOpenBracket: BlockIndent
}

However when I pass an array to a function

MyFunction({
    1,
    2,
    3,
    4
});

It formats all the items into a single line as such:

MyFunction({1, 2, 3, 4});

How do I keep each item on newline?

本文标签: cArray items not staying in newline when passed to a function on formattingStack Overflow