Skip to content

Commit 8af65d9

Browse files
Document include guard convention
1 parent 6d36f59 commit 8af65d9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/developer-notes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -514,6 +514,16 @@ namespace {
514514
source file into account. This allows quoted includes to stand out more when
515515
the location of the source file actually is relevant.
516516

517+
- Use include guards to avoid the problem of double inclusion. The header file
518+
`foo/bar.h` should use the include guard identifier `BITCOIN_FOO_BAR_H`, e.g.
519+
520+
```c++
521+
#ifndef BITCOIN_FOO_BAR_H
522+
#define BITCOIN_FOO_BAR_H
523+
...
524+
#endif // BITCOIN_FOO_BAR_H
525+
```
526+
517527
GUI
518528
-----
519529

0 commit comments

Comments
 (0)