-
Notifications
You must be signed in to change notification settings - Fork 259
Coding Style
SIMDe has an EditorConfig file to configure your editor for things like tabs vs. spaces, how many spaces, etc. If you use an editor which doesn't support it out of the box then odds are good there is a plugin you can download; please do so.
SIMDe uses two spaces for indentation.
The coding style for preprocessor directives is a bit mixed since I made some changes mid-project (sorry!). For new code, please indent the preprocessor conditions before the hash to the same level as the normal code would be, and indent the code inside of preprocessor conditions as if the conditions were normal code. For example:
int
foo(void) {
#if 1
bar();
#else
baz();
#endif
}
Other than that, please just try to follow the existing style. We'll add new rules here as the need arises. If you notice a rule which isn't included here please feel free to add it.