Skip to content
Snippets Groups Projects
Commit 39c4c7a9 authored by Zhi Yong Wu's avatar Zhi Yong Wu Committed by Pekka Enberg
Browse files

CODINGSTYLE.md: add the rule for '*' and '&'


C++ coding convention is to bind '*' and '&' to the type,
not to the variable.

Signed-off-by: default avatarZhi Yong Wu <zwu.kernel@gmail.com>
Signed-off-by: default avatarPekka Enberg <penberg@cloudius-systems.com>
parent c7da7a02
No related branches found
No related tags found
No related merge requests found
...@@ -49,6 +49,12 @@ template and its paramters. ...@@ -49,6 +49,12 @@ template and its paramters.
std::vector<object*> std::vector<object*>
``` ```
2.4 Bind '*' or '&' to the type, not the variable
...
int* a;
int& b;
...
## 3. Braces ## 3. Braces
3.1 Always use curly braces for if statement, even if it is a one line if. 3.1 Always use curly braces for if statement, even if it is a one line if.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment