Document the preference of nullptr over NULL or (void*)0

This commit is contained in:
practicalswift
2017-08-16 17:26:07 +02:00
parent dbf6bd6ea0
commit bea8e9e66e
4 changed files with 8 additions and 7 deletions

View File

@ -37,6 +37,7 @@ code.
- **Miscellaneous**
- `++i` is preferred over `i++`.
- `nullptr` is preferred over `NULL` or `(void*)0`.
- `static_assert` is preferred over `assert` where possible. Generally; compile-time checking is preferred over run-time checking.
Block style example:
@ -276,7 +277,7 @@ Wallet
- *Rationale*: In RPC code that conditionally uses the wallet (such as
`validateaddress`) it is easy to forget that global pointer `pwalletMain`
can be NULL. See `test/functional/disablewallet.py` for functional tests
can be nullptr. See `test/functional/disablewallet.py` for functional tests
exercising the API with `-disablewallet`
- Include `db_cxx.h` (BerkeleyDB header) only when `ENABLE_WALLET` is set