]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
docs/contributing: add `#pragma once` to Coding Conventions
authorJames Laird-Wah <james@laird-wah.net>
Sat, 15 Sep 2018 01:50:12 +0000 (11:50 +1000)
committerDrashna Jaelre <drashna@live.com>
Sat, 15 Sep 2018 16:37:06 +0000 (09:37 -0700)
This supersedes the older include guard mechanism since all the
compilers now support it. It's easier for new users and less prone
to error.

docs/contributing.md

index 8242cc1adc042978774e76cdb467abbdfd2cfe72..7ed7cd06a56c02db9b716fb8afc2472fc88e7e2b 100644 (file)
@@ -70,6 +70,7 @@ Most of our style is pretty easy to pick up on, but right now it's not entirely
   * Do not write obvious comments
   * If you not sure if a comment is obvious, go ahead and include it.
 * In general we don't wrap lines, they can be as long as needed. If you do choose to wrap lines please do not wrap any wider than 76 columns.
+* We use `#pragma once` at the start of header files rather than old-style include guards (`#ifndef THIS_FILE_H`, `#define THIS_FILE_H`, ..., `#endif`)
 
 # General Guidelines