align_var_def_star_style
How to consider (or treat) the '*' in the alignment of variable definitions.
Integer value, default 0.
- 0: Part of the type
void * foo;
(default) - 1: Part of the variable
void *foo;
- 2: Dangling
void *foo;
. Dangling: the '*' will not be taken into account when aligning.
The align_var_def_span must be set to 1 or more for this option work.
Examples
Base Example:
int main()
{
int *base = 9;
int * booOne;
int *roo;
unsigned char* oochoo;
std::cout << sizeof(base) << '\n';
return 0;
}
Base config:
align_var_def_span = 1
align_var_def_star_style = 0 # this value gets changed for every example
value 0
After:
int main()
{
int * base = 9;
int * booOne;
int * roo;
unsigned char* oochoo;
std::cout << sizeof(base) << '\n';
return 0;
}
value 1
After:
int main()
{
int *base = 9;
int * booOne;
int *roo;
unsigned char* oochoo;
std::cout << sizeof(base) << '\n';
return 0;
}
value 2
After:
int main()
{
int *base = 9;
int * booOne;
int *roo;
unsigned char* oochoo;
std::cout << sizeof(base) << '\n';
return 0;
}
See also
- align_var_def_span: The span for aligning variable definitions.
- align_var_def_amp_style: How to consider (or treat) the '&' in the alignment of variable definitions.
- align_same_func_call_params: Whether to align parameters in single-line functions that have the same name.
- align_keep_tabs: Whether to keep non-indenting tabs.