Progress Continues
We've already had 21717 updates since Dolphin 5.0. Keep up with Dolphin's continuing progress through the Dolphin Blog: February, March, and April 2024 Dolphin Progress Report. |
The Dolphin Emulator Wiki needs your help! Dolphin can play thousands of games, and changes are happening all the time. Help us keep up! Join in and help us make this the best resource for Dolphin. |
Coding Style: Difference between revisions
Jump to navigation
Jump to search
(Migrating Coding Style from google code's wiki) |
m (Some minor adjustments to make it easier to read) |
||
Line 4: | Line 4: | ||
<pre>astyle -A1TfpHUxdk1W1wYm0M2j filename.cpp</pre> | <pre>astyle -A1TfpHUxdk1W1wYm0M2j filename.cpp</pre> | ||
== General Rules == | == General Rules == | ||
Line 14: | Line 15: | ||
*Try to eliminate all warnings. | *Try to eliminate all warnings. | ||
*Define global variables at the top of the file/namespace they belong to. | *Define global variables at the top of the file/namespace they belong to. | ||
== Naming Rules == | == Naming Rules == | ||
Line 32: | Line 34: | ||
**statics | **statics | ||
***"s_" | ***"s_" | ||
== Class Names == | == Class Names == | ||
Line 43: | Line 46: | ||
*Follow the indentation/whitespace style shown in the example. | *Follow the indentation/whitespace style shown in the example. | ||
UsefulClass.h | |||
=== UsefulClass.h === | |||
<pre>#pragma once | <pre>#pragma once | ||
Line 83: | Line 87: | ||
} | } | ||
// Every file should end in a newline</pre> | // Every file should end in a newline</pre> | ||
== Indentation/Whitespace Style == | == Indentation/Whitespace Style == | ||
Line 176: | Line 181: | ||
}</pre> | }</pre> | ||
== DON'T DO == | == DON'T DO == |