nl_create_func_def_one_liner
Official description: Whether to collapse a function definition whose body (not counting braces) is only one line so that the entire definition (prototype, braces, body) is a single line.
Really it seems to remove newline between ){
braces, see examples below.
Possible values are true and false, default false.
Examples
true
Before:
int sum(int x, int y)
{
return x+y;
}
int sum20(int x,
int y)
{
return x+y+20;
}
int sum40(int x,
int y)
{
int base = x+y;
return base+40;
}
After
int sum(int x, int y){
return x+y;
}
int sum20(int x,
int y){
return x+y+20;
}
int sum40(int x,
int y)
{
int base = x+y;
return base+40;
}
false
Example remains unchanged.
See also
- nl_create_for_one_liner: Whether to remove a newline in simple unbraced
for
statements - nl_create_if_one_liner: Whether to remove a newline in simple unbraced
if
statements, - nl_squeeze_ifdef: Whether to remove blanks after
#ifxx
and#elxx
, or before#elxx
and#endif
. - nl_after_if: Add or remove blank line after
if
statement. - nl_before_case: Whether to add a newline before
case
, and a blank line before acase
statement that follows a;
or}
.