mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-27 04:40:05 +00:00
Updated Coding Style (markdown)
parent
1ce888d671
commit
4cc680a00d
@ -1,15 +1,13 @@
|
|||||||
Citra is a brand new project, so we have a great opportunity to keep things clean and well organized early on. As such, coding style is very important when making commits. They aren't very strict rules since we want to be flexible and we understand that under certain circumstances some of them can be counterproductive. Just try to follow as many of them as possible:
|
Citra is a brand new project, so we have a great opportunity to keep things clean and well organized early on. As such, coding style is very important when making commits. They aren't very strict rules since we want to be flexible and we understand that under certain circumstances some of them can be counterproductive. Just try to follow as many of them as possible:
|
||||||
|
|
||||||
## General Rules
|
### General Rules
|
||||||
|
|
||||||
* A lot of code was taken from other projects (e.g. Dolphin, PPSSPP, Gekko, SkyEye). In general, when editing other people's code, follow the style of the module you're in (or better yet, fix the style if it drastically differs from our guide).
|
* A lot of code was taken from other projects (e.g. Dolphin, PPSSPP, Gekko, SkyEye). In general, when editing other people's code, follow the style of the module you're in (or better yet, fix the style if it drastically differs from our guide).
|
||||||
* Line width is typically 100 characters, but this isn't strictly enforced. Please do not use 80-characters.
|
* Line width is typically 100 characters, but this isn't strictly enforced. Please do not use 80-characters.
|
||||||
* Don't ever introduce new external dependencies into Core
|
* Don't ever introduce new external dependencies into Core
|
||||||
* Don't use any platform specific code in Core
|
* Don't use any platform specific code in Core
|
||||||
* Use namespaces often
|
* Use namespaces often
|
||||||
|
|
||||||
## Naming Rules
|
### Naming Rules
|
||||||
|
|
||||||
* Functions
|
* Functions
|
||||||
* CamelCase, "_" may also be used for clarity (e.g. ARM_InitCore)
|
* CamelCase, "_" may also be used for clarity (e.g. ARM_InitCore)
|
||||||
* Variables
|
* Variables
|
||||||
@ -22,8 +20,7 @@ Citra is a brand new project, so we have a great opportunity to keep things clea
|
|||||||
* Namespaces
|
* Namespaces
|
||||||
* CamelCase, "_" may also be used for clarity (e.g. ARM_InitCore)
|
* CamelCase, "_" may also be used for clarity (e.g. ARM_InitCore)
|
||||||
|
|
||||||
# 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.
|
||||||
|
|
||||||
<pre>namespace Example {
|
<pre>namespace Example {
|
||||||
|
Loading…
Reference in New Issue
Block a user