You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 03-Style.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,11 +27,13 @@ Name private data with a `m_` prefix to distinguish it from public data. `m_` st
27
27
28
28
## Distinguish Function Parameters
29
29
30
+
The most important thing is consistency within your codebase, this is one possibility to help with consistency.
31
+
30
32
Name function parameters with an `t_` prefix. `t_` can be thought of as "the", but the meaning is arbitrary. The point is to distinguish function parameters from other variables in scope while giving us a consistent naming strategy.
31
33
32
34
By using `t_` for parameters and `m_` for module data, we can have consistency with both public members of structs and private members of classes.
33
35
34
-
Any prefix or postfix can be chosen for your organization. This is just one example. This suggestion is controversial, for a discussion about it see issue [#11](https://github.com/lefticus/cppbestpractices/issues/11).
36
+
Any prefix or postfix can be chosen for your organization. This is just one example. *This suggestion is controversial, for a discussion about it see issue [#11](https://github.com/lefticus/cppbestpractices/issues/11).*
0 commit comments