mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
Merge #8602: [trivial][doc] Mention ++i as preferred over i++ in dev notes
ab53207
[trivial][doc] Mention ++i as preferred to i++ in dev notes (fanquake)
This commit is contained in:
parent
59f4df1d8b
commit
87c81ba6f9
@ -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++`.
|
||||
- Align pointers and references to the left i.e. use `type& var` and not `type &var`.
|
||||
|
||||
Block style example:
|
||||
@ -25,7 +26,7 @@ class Class
|
||||
bool Function(char* psz, int n, const string& s)
|
||||
{
|
||||
// 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;
|
||||
|
Loading…
Reference in New Issue
Block a user