forked from suyu/suyu
Update CONTRIBUTING.md
This commit is contained in:
parent
37fe84c512
commit
b4c53b1e59
1 changed files with 4 additions and 2 deletions
|
@ -52,7 +52,7 @@ namespace Example {
|
||||||
// Namespace contents are not indented
|
// Namespace contents are not indented
|
||||||
|
|
||||||
// Declare globals at the top
|
// Declare globals at the top
|
||||||
int g_foo = 0;
|
int g_foo{}; // {} can be used to initialize types as 0, false, or nullptr
|
||||||
char* g_some_pointer; // Pointer * and reference & stick to the type name
|
char* g_some_pointer; // Pointer * and reference & stick to the type name
|
||||||
|
|
||||||
/// A colorful enum.
|
/// A colorful enum.
|
||||||
|
@ -73,7 +73,9 @@ struct Position {
|
||||||
// Use "typename" rather than "class" here
|
// Use "typename" rather than "class" here
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void FooBar() {
|
void FooBar() {
|
||||||
int some_array[] = {
|
std::string some_string{ "prefer uniform initialization" };
|
||||||
|
|
||||||
|
int some_array[]{
|
||||||
5,
|
5,
|
||||||
25,
|
25,
|
||||||
7,
|
7,
|
||||||
|
|
Loading…
Reference in a new issue