mirror of
https://github.com/swaywm/sway.git
synced 2026-04-26 06:46:26 -04:00
CONTRIBUTING.md: Add note about sizeof style
Throughout the code base, sizeof is used with the struct name. To maintain consistency, this should continue being used. It does however differ from the kernel style guide and should be mentioned.
This commit is contained in:
parent
7ca9ef12f8
commit
c4ae47d71e
1 changed files with 6 additions and 0 deletions
|
|
@ -174,6 +174,12 @@ Keep the use of macros to a minimum, especially if a function can do the job. If
|
||||||
you do need to use them, try to keep them close to where they're being used and
|
you do need to use them, try to keep them close to where they're being used and
|
||||||
`#undef` them after.
|
`#undef` them after.
|
||||||
|
|
||||||
|
### Other Differences
|
||||||
|
|
||||||
|
For sizeof, please use the struct name instead of the variable name. This is the
|
||||||
|
style that is used throughout the code base and should continue being used to
|
||||||
|
maintain consistency.
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```c
|
```c
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue