File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 22Coding Style
33=============
44
5+ .. note ::
6+
7+ Many of the rules and conventions described in this document are not yet followed consistently throughout the codebase.
8+ They represent the direction we want to move in.
9+ Contributors are encouraged to adopt these guidelines in new code and when modifying existing code,
10+ so that the project gradually becomes more consistent and maintainable over time.
11+
12+ Header Guard Convention
13+ ~~~~~~~~~~~~~~~~~~~~~
14+
15+ - Always use ``#pragma once `` as the first line in every header file, even before any file-level comments or code.
16+
17+ It is recommended that ``#pragma once `` appears before the file comment.
18+ The reason is that file comments may be duplicated each time the header is included,
19+ which can slow down compilation in large codebases due to extra file I/O.
20+
21+ Example:
22+
23+ .. code-block :: cpp
24+
25+ #pragma once
26+
27+ /**
28+ * @file netlist_walker.h
29+ * @brief Utilities for traversing the netlist.
30+ */
31+ // ...rest of header...
32+
533 Naming Conventions
634~~~~~~~~~~~~~
735
You can’t perform that action at this time.
0 commit comments