Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #10359 from PEmu2/links
Update some contributing doc links
  • Loading branch information
Pokechu22 committed Jan 9, 2022
2 parents e5ef597 + 0dad6e1 commit 36d6057
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Contributing.md
Expand Up @@ -97,7 +97,7 @@ Summary:
- `constexpr int MAX_PATH = 260;`
- All variables should be lowercase with underscores separating the individual words in the 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](https://en.wikipedia.org/wiki/Hungarian_notation) prefixes with variables. The only exceptions to this are the variable prefixes below.
- Global variables – `g_`
- Class variables – `m_`
- Static variables – `s_`
Expand Down Expand Up @@ -137,7 +137,7 @@ Summary:


## <a name="cpp-style-classes-and-structs"></a>Classes and structs
- If making a [POD](http://en.wikipedia.org/wiki/Plain_Old_Data_Structures) type, use a `struct` for this. Use a `class` otherwise.
- If making a [POD](https://en.wikipedia.org/wiki/Passive_data_structure) type, use a `struct` for this. Use a `class` otherwise.
- Class layout should be in the order, `public`, `protected`, and then `private`.
- If one or more of these sections are not needed, then simply don't include them.
- For each of the above specified access levels, the contents of each should follow this given order: constructor, destructor, operator overloads, functions, then variables.
Expand Down Expand Up @@ -174,8 +174,8 @@ Summary:

## <a name="cpp-code-general"></a>General
- The codebase currently uses C++17.
- Use the [nullptr](http://en.cppreference.com/w/cpp/language/nullptr) type over the macro `NULL`.
- If a [range-based for loop](http://en.cppreference.com/w/cpp/language/range-for) can be used instead of container iterators, use it.
- Use the [nullptr](https://en.cppreference.com/w/cpp/language/nullptr) type over the macro `NULL`.
- If a [range-based for loop](https://en.cppreference.com/w/cpp/language/range-for) can be used instead of container iterators, use it.
- Obviously, try not to use `goto` unless you have a *really* good reason for it.
- If a compiler warning is found, please try and fix it.
- Try to avoid using raw pointers (pointers allocated with `new`) as much as possible. There are cases where using a raw pointer is unavoidable, and in these situations it is OK to use them. An example of this is functions from a C library that require them. In cases where it is avoidable, the STL usually has a means to solve this (`vector`, `unique_ptr`, etc).
Expand Down

0 comments on commit 36d6057

Please sign in to comment.