From eee8cc67daf6489e445ce354b961bf9949c82267 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 23 Nov 2014 19:44:00 -0200 Subject: [PATCH 1/2] Add comment style notes to CONTRIBUTING.md Closes #215 --- CONTRIBUTING.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 302afe2165..0f9b1ad8e6 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; }; From 1d5d94a1b92fdde6381ea9c5f3d12f2c41d3705d Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 23 Nov 2014 19:54:04 -0200 Subject: [PATCH 2/2] Update CONTRIBUTING.md --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0f9b1ad8e6..82b66be75c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ enum SomeEnum { }; /** - * Very important function that does a lot of stuff. + * Very important struct that does a lot of stuff. * Note that the asterisks are indented by one space. */ struct Position {