diff options
| author | practicalswift <[email protected]> | 2018-03-22 16:22:17 +0100 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2018-03-22 16:23:04 +0100 |
| commit | 8af65d96f4166cb57ff567a4c937f81c8e5a8aeb (patch) | |
| tree | dd20a6b8ee8731ca44c62639a11120bb2896199d /doc/developer-notes.md | |
| parent | Merge #12076: qa: Use node.datadir instead of tmpdir in test framework (diff) | |
| download | discoin-8af65d96f4166cb57ff567a4c937f81c8e5a8aeb.tar.xz discoin-8af65d96f4166cb57ff567a4c937f81c8e5a8aeb.zip | |
Document include guard convention
Diffstat (limited to 'doc/developer-notes.md')
| -rw-r--r-- | doc/developer-notes.md | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/developer-notes.md b/doc/developer-notes.md index 8f06ee4ec..77ab9cccb 100644 --- a/doc/developer-notes.md +++ b/doc/developer-notes.md @@ -514,6 +514,16 @@ namespace { source file into account. This allows quoted includes to stand out more when the location of the source file actually is relevant. +- Use include guards to avoid the problem of double inclusion. The header file + `foo/bar.h` should use the include guard identifier `BITCOIN_FOO_BAR_H`, e.g. + +```c++ +#ifndef BITCOIN_FOO_BAR_H +#define BITCOIN_FOO_BAR_H +... +#endif // BITCOIN_FOO_BAR_H +``` + GUI ----- |