-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Style enums properly. #214
Comments
this was actually agreed, I just havent updated the style guide yet, because im lazy and busy do not typedef enums, refer explicitly to them, PascalCase |
No typedef, PascalCase |
This issue has had no activity for 60 days and will be marked stale. If there is no further activity, it will be closed in 30 days. |
This issue has had no activity for 60 days and will be marked stale. If there is no further activity, it will be closed in 30 days. |
This issue has had no activity for 90 days and will now be closed. |
There is no consensus whether enums are enums or typedefs.
Case 1: enums are enums, not typedefs
Do not typedef enums
Good:
Bad:
There is no consensus of the casing of enums (when enums are enums and not typedefs).
Option 1: PascalCase
Option 2: alllowercase_t (similar to primitive non-unit typedefs)
Note: Primitive unit typedefs are
u8
,u16
,u32
,s8
,s16
,s32
etc....Reference all enums with
enum
in code (this is forced anyway)Good:
Bad (doesn't compile anyway):
Case 2: enums are typedefs
Enum casing should be alllowercase_t
Good:
Bad:
Follow points 1, 2, and 3 of issue #212 (covers typedef struct naming) for the rest of the info
The text was updated successfully, but these errors were encountered: