diff options
| author | 2014-11-23 19:44:00 -0200 | |
|---|---|---|
| committer | 2014-11-23 19:44:00 -0200 | |
| commit | eee8cc67daf6489e445ce354b961bf9949c82267 (patch) | |
| tree | 9290b4669f7b144c04f4663cc0140f25b4e5c6f3 | |
| parent | Merge pull request #190 from purpasmart96/more_services (diff) | |
| download | yuzu-eee8cc67daf6489e445ce354b961bf9949c82267.tar.gz yuzu-eee8cc67daf6489e445ce354b961bf9949c82267.tar.xz yuzu-eee8cc67daf6489e445ce354b961bf9949c82267.zip | |
Add comment style notes to CONTRIBUTING.md
Closes #215
Diffstat (limited to '')
| -rw-r--r-- | CONTRIBUTING.md | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 302afe216..0f9b1ad8e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md | |||
| @@ -24,6 +24,10 @@ Citra is a brand new project, so we have a great opportunity to keep things clea | |||
| 24 | ### Indentation/Whitespace Style | 24 | ### Indentation/Whitespace Style |
| 25 | Follow the indentation/whitespace style shown below. Do not use tabs, use 4-spaces instead. | 25 | Follow the indentation/whitespace style shown below. Do not use tabs, use 4-spaces instead. |
| 26 | 26 | ||
| 27 | ### Comments | ||
| 28 | * For regular comments, use C++ style (`//`) comments, even for multi-line ones. | ||
| 29 | * For doc-comments (Doxygen comments), use `/// ` if it's a single line, else use the `/**` `*/` style featured in the example. Start the text on the second line, not the first containing `/**`. | ||
| 30 | |||
| 27 | ```cpp | 31 | ```cpp |
| 28 | namespace Example { | 32 | namespace Example { |
| 29 | 33 | ||
| @@ -33,12 +37,17 @@ namespace Example { | |||
| 33 | int g_foo = 0; | 37 | int g_foo = 0; |
| 34 | char* g_some_pointer; // Notice the position of the * | 38 | char* g_some_pointer; // Notice the position of the * |
| 35 | 39 | ||
| 40 | /// A colorful enum. | ||
| 36 | enum SomeEnum { | 41 | enum SomeEnum { |
| 37 | COLOR_RED, | 42 | COLOR_RED, ///< The color of fire. |
| 38 | COLOR_GREEN, | 43 | COLOR_GREEN, ///< The color of grass. |
| 39 | COLOR_BLUE | 44 | COLOR_BLUE ///< Not actually the color of water. |
| 40 | }; | 45 | }; |
| 41 | 46 | ||
| 47 | /** | ||
| 48 | * Very important function that does a lot of stuff. | ||
| 49 | * Note that the asterisks are indented by one space. | ||
| 50 | */ | ||
| 42 | struct Position { | 51 | struct Position { |
| 43 | int x, y; | 52 | int x, y; |
| 44 | }; | 53 | }; |