Merge pull request #5387 from leoetlino/constexpr

Contributing: Use constexpr for compile-time constants
This commit is contained in:
Mat M 2017-05-07 17:56:37 -04:00 committed by GitHub
commit 7a25dde8df
1 changed files with 2 additions and 2 deletions

View File

@ -89,8 +89,8 @@ Summary:
- `class SomeClassName` - `class SomeClassName`
- `enum IPCCommandType` - `enum IPCCommandType`
- All compile time constants should be fully uppercased. With constants that have more than one word in them, use an underscore to separate them. - All compile time constants should be fully uppercased. With constants that have more than one word in them, use an underscore to separate them.
- `const double PI = 3.14159;` - `constexpr double PI = 3.14159;`
- `const int MAX_PATH = 260;` - `constexpr int MAX_PATH = 260;`
- All variables should be lowercase with underscores separating the individual words in the name. - All variables should be lowercase with underscores separating the individual words in the name.
- `int this_variable_name;` - `int this_variable_name;`
- Please do not use [Hungarian notation](http://en.wikipedia.org/wiki/Hungarian_notation) prefixes with variables. The only exceptions to this are the variable prefixes below. - Please do not use [Hungarian notation](http://en.wikipedia.org/wiki/Hungarian_notation) prefixes with variables. The only exceptions to this are the variable prefixes below.