-
-
Notifications
You must be signed in to change notification settings - Fork 347
Code Style
David Holdeman edited this page Dec 4, 2025
·
10 revisions
-
Reduce visibility where possible
-
Avoid magic constants
-
Please do not push dead code
We make with -std=c++20; see the Makefile.
Only the simplest, two-line if/for/while should not have the curly brackets. Anything more than two lines should have {}.
if (plain_condition)
oneLineStatement();
if (plain_condition) {
// comment
oneLineStatement();
}
if (plain_condition) {
oneLineStatement();
} else {
oneLineStatement2();
}Code formatting matters. The de facto standard is Eclipse CDT (K&R) with one change: Maximum line width = 120
This standard is far from perfect, but it's good enough for now.
- How to search the Wiki
- Quick Start
- Support & Community
- How to create a TunerStudio project
- rusEFI Online
- FAQs and HOWTOs
