forked from rusefi/rusefi
-
Notifications
You must be signed in to change notification settings - Fork 0
Code Style
David Holdeman edited this page Jan 7, 2023
·
8 revisions
-
Reduce visibility where possible
-
Avoid magic constants
-
Please do not push dead code
We make with -std=c++11 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
- How to ask questions
- Support
- How to create a TunerStudio project
- HOWTOs and FAQs
- rusEFI Online
- Fueling
- Multispark
- Cranking
- Electronic Throttle
- Knock Sensing
- Variable Valve Timing
- Lua Scripting
- GDI
- rusEFI virtual simulator
- Digital Dash