从重新格式化,我想:
int* n;
int& m;
int const* o;
相反,我得到:
int *n;
int &m;
int const *o;
如何让CLion做我想做的事?
答案 0 :(得分:6)
Prevent Auto Format from align Pointer to variable指向https://www.jetbrains.com/help/clion/2016.3/code-style.html
在设置
中搜索了许多选项后Editor -> Code Style -> C/C++ -> Spaces ->
From:
before '*' in declarations
before '&' in declarations
to:
after '*' in declarations.
after '&' in declarations.