aboutsummaryrefslogtreecommitdiffhomepage
path: root/CONTRIBUTING.md
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <[email protected]>2014-11-23 19:44:00 -0200
committerYuri Kunde Schlesner <[email protected]>2014-11-23 19:44:00 -0200
commiteee8cc67daf6489e445ce354b961bf9949c82267 (patch)
tree9290b4669f7b144c04f4663cc0140f25b4e5c6f3 /CONTRIBUTING.md
parentaa986370f3d19d93c24fcd158c551f2a994eec58 (diff)
downloadyuzu-android-eee8cc67daf6489e445ce354b961bf9949c82267.tar.gz
yuzu-android-eee8cc67daf6489e445ce354b961bf9949c82267.zip
Add comment style notes to CONTRIBUTING.md
Closes #215
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r--CONTRIBUTING.md15
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
### Indentation/Whitespace Style
Follow the indentation/whitespace style shown below. Do not use tabs, use 4-spaces instead.
+### Comments
+* For regular comments, use C++ style (`//`) comments, even for multi-line ones.
+* 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 `/**`.
+
```cpp
namespace Example {
@@ -33,12 +37,17 @@ namespace Example {
int g_foo = 0;
char* g_some_pointer; // Notice the position of the *
+/// A colorful enum.
enum SomeEnum {
- COLOR_RED,
- COLOR_GREEN,
- COLOR_BLUE
+ COLOR_RED, ///< The color of fire.
+ COLOR_GREEN, ///< The color of grass.
+ COLOR_BLUE ///< Not actually the color of water.
};
+/**
+ * Very important function that does a lot of stuff.
+ * Note that the asterisks are indented by one space.
+ */
struct Position {
int x, y;
};