I'm trying to formal my c++ code with AStyle utility and want to remain second line of function parametes unaffected by the tool. E.g. input file:
class C
{
public:
void func(double d,
int i) const;
};
void C::func(double d,
int i) const
{ }
After formatting with the following options:
--style=allman
--pad-oper
--pad-header
--close-templates
--indent-switches
--keep-one-line-blocks
--keep-one-line-statements
--unpad-paren
--align-pointer=type
--align-reference=type
--mode=c
my file became as following:
class C
{
public:
void func(double d,
int i) const;
};
void C::func(double d,
int i) const
{ }
I.e. int i is aligned same as double d.
Is there an option for AStyle to prevent formatting of the second (and more) line paramets of the function?
No metter is there a definition, a declaration or a call.