Astyle 配置使用


默认采用大括号样式,开口大括号不变,闭合大括号将与上一行断开。

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
int Foo(bool isBar)
{
    if (isBar)
    {
        bar();
        return 1;
    }
    else
        return 0;
}
1
2
3
4
5
6
7
int Foo(bool isBar) {
    if (isBar) {
        bar();
        return 1;
    } else
        return 0;
}
1
2
3
4
5
6
7
8
int Foo(bool isBar)
{
    if (isBar) {
        bar();
        return 1;
    } else
        return 0;
}
1
2
3
4
5
6
7
8
9
int Foo(bool isBar)
{
    if (isBar) {
        bar();
        return 1;
    }
    else
        return 0;
}