mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-18 02:53:52 +01:00
CODING_CONVENTION.md: migrate to #pragma once
This commit is contained in:
parent
3b6d95fa66
commit
357a37cc28
@ -311,7 +311,9 @@ is considered as unused. To avoid this, one should add
|
||||
|
||||
## Header Guards
|
||||
|
||||
All files are required to have header guards of the form
|
||||
All header files are required to either contain the widely supported `#pragma once`
|
||||
preprocessor directive as the first line after the [copyright note](#documentation),
|
||||
or header guards of the form
|
||||
|
||||
```c
|
||||
#ifndef PATH_TO_FILE_FILENAME_H
|
||||
@ -321,6 +323,9 @@ All files are required to have header guards of the form
|
||||
#endif /* PATH_TO_FILE_FILENAME_H */
|
||||
```
|
||||
|
||||
Header guards are deprecated in RIOT header files and will gradually be converted
|
||||
to `#pragma once`.
|
||||
|
||||
Rules for generating the guard name:
|
||||
|
||||
1. take the file name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user