Commit 750e5087 by Jamie Madill

Update style guide.

Mention enums and static members can use CamelCase. Bug: angleproject:1944 Change-Id: I7294418e9118d9d690f8f9c61adad9f5b819cc16 Reviewed-on: https://chromium-review.googlesource.com/1207550Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent cc046630
...@@ -58,21 +58,21 @@ This will catch most of the trivial formatting errors and save you time. ...@@ -58,21 +58,21 @@ This will catch most of the trivial formatting errors and save you time.
#### Variable Names #### Variable Names
Use the following guidelines, they do deviate somewhat from the Google Use the following guidelines, they do deviate somewhat from the [Google
guidelines. guidelines](https://google.github.io/styleguide/cppguide.html#Naming).
* class and type names: start with capital letter and use CamelCase. * Class and type names: start with capital letter and use CamelCase.
* {DEV} class member variables: use an **`m`** prefix instead of trailing * {DEV} Class member variables: use an **`m`** prefix instead of trailing
underscore and use CamelCase. underscore and use CamelCase.
* global variables (if they must be used): use a **`g`** prefix. * Global variables (if they must be used): use a **`g`** prefix.
* {DEV} variable names: start with lower case and use CamelCase (chosen for consistency) * {DEV} Variable names: start with lower case and use CamelCase (chosen for consistency)
* {DEV} function names: Member functions start with lower case and use CamelCase. Non-member functions start with capital letter and * {DEV} Function names: Member functions start with lower case and use CamelCase. Non-member and static member functions start with capital letter and
use CamelCase (chosen for consistency) use CamelCase (chosen for consistency)
* Constants: start with a **`k`** and use CamelCase * {DO} Constants: start with a **`k`** and use CamelCase
* namespaces: use all lower case * Namespaces: short names. use all lower case
* Enum Names - use class enums, and the values should be uppercase with underscores. * Enum Names: use class enums when possible. The values should be uppercase with underscores or CamelCase.
* macros: all uppercase with underscores * Macros: all uppercase with underscores
* exceptions to naming: use common sense! * Exceptions to naming: use common sense!
### [Comments](https://google.github.io/styleguide/cppguide.html#Comments) ### [Comments](https://google.github.io/styleguide/cppguide.html#Comments)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment