diff options
author | mmentovai <mmentovai@955884f1-7149-0410-9467-59e7ac3f4d80> | 2008-12-17 22:24:29 +0000 |
---|---|---|
committer | mmentovai <mmentovai@955884f1-7149-0410-9467-59e7ac3f4d80> | 2008-12-17 22:24:29 +0000 |
commit | db0be8e44d43c6460e60c5c611b39b4f02165162 (patch) | |
tree | 01cca3cb1a4ad757bc94f10b2789d1d79d7659d1 /cppguide.xml | |
parent | 219b1a61fd8fc1dea4c500b1a6bdad06f9148210 (diff) | |
download | google-styleguide-db0be8e44d43c6460e60c5c611b39b4f02165162.tar.gz |
Update C++ style guide:
- Allow unsigned types where defined overflow behavior is desired
- Clarify that a function-closing } is permitted on the same line as an
opening { for one-line functions
Set svn:eol-style = native on google-c-style.el
Diffstat (limited to 'cppguide.xml')
-rw-r--r-- | cppguide.xml | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/cppguide.xml b/cppguide.xml index 5e351ae..74e708c 100644 --- a/cppguide.xml +++ b/cppguide.xml @@ -2149,8 +2149,9 @@ Tashana Landray You should not use the unsigned integer types such as <code>uint32_t</code>, unless the quantity you are representing is really a bit pattern - rather than a number. In particular, do not use unsigned types to - say a number will never be negative. Instead, use + rather than a number, or unless you need defined + twos-complement overflow. In particular, do not use unsigned + types to say a number will never be negative. Instead, use assertions for this. </p> @@ -3472,8 +3473,9 @@ Tashana Landray <li> The open curly brace is always at the end of the same line as the last parameter. </li> - <li> The close curly brace is always on the last line by - itself. + <li> The close curly brace is either on the last line by itself + or (if other style rules permit) on the same line as the + open curly brace. </li> <li> There should be a space between the close parenthesis and the open curly brace. |