docs: Document cast formatting rules

This commit is contained in:
Daan De Meyer
2025-11-22 22:50:39 +01:00
committed by Mike Yuan
parent f53ac7742f
commit dd281e19a7

View File

@@ -67,6 +67,18 @@ SPDX-License-Identifier: LGPL-2.1-or-later
const char *foo(const char *input);
```
- Casts should be written like this:
```c
(const char*) s;
```
instead of this:
```c
(const char *)s;
```
- Single-line `if` blocks should not be enclosed in `{}`. Write this:
```c