Changeset View
Changeset View
Standalone View
Standalone View
doc/developer-notes.md
Show First 20 Lines • Show All 365 Lines • ▼ Show 20 Lines | - Include `db_cxx.h` (BerkeleyDB header) only when `ENABLE_WALLET` is set | ||||
- *Rationale*: Otherwise compilation of the disable-wallet build will fail in environments without BerkeleyDB | - *Rationale*: Otherwise compilation of the disable-wallet build will fail in environments without BerkeleyDB | ||||
General C++ | General C++ | ||||
------------- | ------------- | ||||
- Assertions should not have side-effects | - Assertions should not have side-effects | ||||
- *Rationale*: Even though the source code is set to to refuse to compile | - *Rationale*: Even though the source code is set to refuse to compile | ||||
with assertions disabled, having side-effects in assertions is unexpected and | with assertions disabled, having side-effects in assertions is unexpected and | ||||
makes the code harder to understand | makes the code harder to understand | ||||
- If you use the `.h`, you must link the `.cpp` | - If you use the `.h`, you must link the `.cpp` | ||||
- *Rationale*: Include files define the interface for the code in implementation files. Including one but | - *Rationale*: Include files define the interface for the code in implementation files. Including one but | ||||
not linking the other is confusing. Please avoid that. Moving functions from | not linking the other is confusing. Please avoid that. Moving functions from | ||||
the `.h` to the `.cpp` should not result in build errors | the `.h` to the `.cpp` should not result in build errors | ||||
▲ Show 20 Lines • Show All 329 Lines • Show Last 20 Lines |