Confirmed users
1,345
edits
Nnethercote (talk | contribs) |
Nnethercote (talk | contribs) |
||
| Line 265: | Line 265: | ||
* js*inlines.h | * js*inlines.h | ||
* */*-inl.h. | * */*-inl.h. | ||
Keep (case-insensitive) lexicographic order with each section. | |||
The presence of conditionally-compiled #include statements complicates thing. If you have a single #include statement within a #if/#ifdef/#ifndef block, placing the block in the appropriate section is straightforward. If you have multiple #include statements within a block, use your judgment as to where the best place for it is. | |||
Example for X.cpp: | Example for X.cpp: | ||
| Line 270: | Line 274: | ||
#include "X.h" // put "X-inl.h" instead, if it exists | #include "X.h" // put "X-inl.h" instead, if it exists | ||
#include "mozilla/ | #include "mozilla/HashFunctions.h" | ||
#include <string.h> | #include <string.h> | ||
#include "jsbar.h" | #include "jsbar.h" | ||
#include "jsbaz.h" | #ifdef BAZ | ||
# include "jsbaz.h" | |||
#endif | |||
#include "jscaz.h" | |||
#include "ds/Baz.h" | #include "ds/Baz.h" | ||
| Line 286: | Line 293: | ||
#include "frontend/Thingamabob-inl.h" | #include "frontend/Thingamabob-inl.h" | ||
#include "vm/VirtualReality-inl.h" | #include "vm/VirtualReality-inl.h" | ||
= C++ = | = C++ = | ||