Skip to content

Commit

Permalink
[docs] Update coding style doc regarding C++ [[fallthrough]]
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfbeast committed Feb 10, 2025
1 parent 1cffa21 commit 53b1740
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/UXP Coding Style.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ switch (variable) {
case value2: // Comment describing 2 (alternative)
code_for_2;
code_for_2;
// fallthrough
[[fallthrough]];
case value3:
case value4:
code_for_3_and_4;
Expand All @@ -139,6 +139,7 @@ switch (variable) {
code_for_default;
}
```
All fallthrough cases in C++ should include the `[[fallthrough]]` C++17 keyword.
### Classes
Classes have some special formatting rules applied to them:
- Classes follow the following sequence: CTOR, DTOR, methods, variables
Expand Down

0 comments on commit 53b1740

Please sign in to comment.