Update style guide
This commit is contained in:
@@ -177,9 +177,11 @@ should ensure that they get caught somewhere before `main()`.
|
|||||||
|
|
||||||
Prefer C++-style casts to C-style casts.
|
Prefer C++-style casts to C-style casts.
|
||||||
|
|
||||||
Do not use `cout`, `clog`, `cerr`, or `cin`. Do not include `<iostream>`.
|
Do not use the C-style stream functions `printf`, `fprintf`, or `perror`
|
||||||
To write log messages, use `printf`. All other C++ streams are permitted
|
to print diagnostic output to stdout or stderr. Use either `cout` or
|
||||||
and in fact encouraged. Do not use `sprintf` for anything.
|
`cerr` for this purpose. Do not use `clog` or `cin`. For other uses,
|
||||||
|
C++ streams are included. Do not use `sprintf` for anything. Do not
|
||||||
|
even use `snprintf`.
|
||||||
|
|
||||||
Use const whenever it makes sense. In particular, declare string
|
Use const whenever it makes sense. In particular, declare string
|
||||||
constants as `const char*const`.
|
constants as `const char*const`.
|
||||||
|
|||||||
Reference in New Issue
Block a user