mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 12:04:16 +01:00
parent
aa986370f3
commit
eee8cc67da
@ -24,6 +24,10 @@ Citra is a brand new project, so we have a great opportunity to keep things clea
|
|||||||
### Indentation/Whitespace Style
|
### Indentation/Whitespace Style
|
||||||
Follow the indentation/whitespace style shown below. Do not use tabs, use 4-spaces instead.
|
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
|
```cpp
|
||||||
namespace Example {
|
namespace Example {
|
||||||
|
|
||||||
@ -33,12 +37,17 @@ namespace Example {
|
|||||||
int g_foo = 0;
|
int g_foo = 0;
|
||||||
char* g_some_pointer; // Notice the position of the *
|
char* g_some_pointer; // Notice the position of the *
|
||||||
|
|
||||||
|
/// A colorful enum.
|
||||||
enum SomeEnum {
|
enum SomeEnum {
|
||||||
COLOR_RED,
|
COLOR_RED, ///< The color of fire.
|
||||||
COLOR_GREEN,
|
COLOR_GREEN, ///< The color of grass.
|
||||||
COLOR_BLUE
|
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 {
|
struct Position {
|
||||||
int x, y;
|
int x, y;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user