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

This commit is contained in:
practicalswift committed 2017-08-18 09:51:00 +02:00
1 parent dbf6bd6ea0
commit bea8e9e66e
4 files changed
+8 -7

No files matched your search

+2 -1
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