nl_collapse_empty_body

Whether to collapse empty blocks between '{' and '}'.

Possible values are true and false, default false.

Examples

true

Code before

int main()
{
    int x = 10;
    int y = 20;

    // if with else
    if (x<y) {
        std::cout << "Also x is less than " << y << '\n';
    }
    else {

    }

}

After

int main()
{
    int x = 10;
    int y = 20;

    // if with else
    if (x<y) {
        std::cout << "Also x is less than " << y << '\n';
    }
    else {}

}

false

The example above remains unchanged.

See also