[trivial][doc] Mention ++i as preferred to i++ in dev notes

This commit is contained in:
fanquake 2016-08-26 19:40:24 +08:00
parent 12892dbb9f
commit ab53207b9c
No known key found for this signature in database
GPG Key ID: 2EEB9F5CC09526C1
1 changed files with 4 additions and 3 deletions

View File

@ -14,6 +14,7 @@ gradually.
- No indentation for public/protected/private or for namespaces.
- No extra spaces inside parenthesis; don't do ( this )
- No space after function names; one space after if, for and while.
- `++i` is preferred over `i++`.
Block style example:
```c++
@ -24,7 +25,7 @@ class Class
bool Function(char* psz, int n)
{
// Comment summarising what this section of code does
for (int i = 0; i < n; i++) {
for (int i = 0; i < n; ++i) {
// When something fails, return early
if (!Something())
return false;
@ -231,9 +232,9 @@ General Bitcoin Core
- *Rationale*: Makes sure that they pass thorough testing, and that the tester will keep passing
on the master branch. Otherwise all new pull requests will start failing the tests, resulting in
confusion and mayhem
- *Explanation*: If the test suite is to be updated for a change, this has to
be done first
be done first
Wallet
-------