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
- nl_if_brace - Add or remove newline between
if
and{
. - sp_brace_else - Add or remove space between
}
andelse
if on the same line