diff options
author | Jeevaka Badrappan <jeevaka.badrappan@elektrobit.com> | 2011-02-05 06:29:05 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-02-05 07:03:32 -0800 |
commit | b363b8f0cf72af7a571988eb5c6c6f8c531ea858 (patch) | |
tree | c031d0236cdd10d03f7723f234a28fcd0405fb78 /doc | |
parent | c70805bdeed33d65f8cf5c58eb68d656fe990948 (diff) |
coding-style: Don't use hex with shift operator
Diffstat (limited to 'doc')
-rw-r--r-- | doc/coding-style.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/coding-style.txt b/doc/coding-style.txt index 40bb36b9..287e9e92 100644 --- a/doc/coding-style.txt +++ b/doc/coding-style.txt @@ -294,6 +294,18 @@ void foo() // Wrong { } +M16: Don't use hex value with shift operators +============================================== +The expression argument to the shift operators should not be in hex. + +Example: + +1) +1 << y + +2) +0x1 << y // Wrong + O1: Shorten the name ==================== Better to use abbreviation, rather than full name, to name a variable, |