You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+6-77Lines changed: 6 additions & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -90,80 +90,9 @@ When the pull request is merged, the status should be set to "AWAITING_BUILD".
90
90
91
91
## Coding style
92
92
93
-
### C++ coding style
94
-
95
-
The majority of the engine is written in C++, but the style treats C++ as an improved version of C, and doesn't use the whole of the language's feature set. In particular:
96
-
97
-
* The engine doesn't use exceptions or RTTI (run time type information).
98
-
* Templates are used sparingly, and typically as "sanitized macros" for efficiency purposes or for resource management.
99
-
* No standard C++ library is used (i.e. you cannot use anything in the `std` namespace)
100
-
101
-
#### Naming convention
102
-
103
-
The engine source code follows a standard naming convention.
104
-
105
-
Variable and function names should be descriptive. Don't be scared of verbosity (but don't go too overboard on symbol lengths)
106
-
107
-
108
-
Variable names:
109
-
* should be lowercase, with words separated by underscores ("\_")
110
-
* should be prefixed to indicate scope:
111
-
* "t\_": local variables
112
-
* "p\_": in parameters
113
-
* "r\_": out parameters
114
-
* "x\_": in-out parameters
115
-
* "m\_": class or struct instance member variables
116
-
* "s\_": class, function, or file-local static variables
117
-
* "g\_": global variables
118
-
* example: `t_foo_bar`
119
-
120
-
Constants' names (including enum members):
121
-
* should be camel-case
122
-
* should prefixed with `kMC` and the module name
123
-
* example: `kMCModuleFooBar`
124
-
125
-
Function names:
126
-
* should generally be camel-case
127
-
* public / exported functions should have names prefixed with "MC" followed by the module name.
128
-
* file-local static functions may also be in lower-case and underscore-separated
129
-
* example: `MCFooBar()`
130
-
131
-
#### Coding practices
132
-
133
-
* Declare and initialize local variables on separate lines
134
-
* Initialize all variables to a base value, e.g.
135
-
* pointers to `nil`
136
-
* bools to `true` or `false`
137
-
* numbers to 0
138
-
* Only pass `bool` values to conditions (e.g. `if`, `while`, etc.). Don't assume that `nil`/`null`/`0` are false.
139
-
* Always check the success of memory allocations; if the calling code can't handle memory failure then prefix the line that allocates with `/* UNCHECKED */`
140
-
* Avoid using preprocessor macros to abbreviate code; use inline and/or template functions instead
141
-
* Use implicit resource management (e.g. `MCAutoStringRef`) wherever reasonably possible
142
-
* Functions should not modify "out" function parameters until immediately before returning, and only on success
143
-
*`goto` is only usually acceptable for implementing cleanup-on-error
144
-
* Avoid using the ternary operator (`<condition> ? <expr-if-true> : <expr-if-false>`)
145
-
* Use a bit-field when declaring boolean values in a struct or class (e.g. `bool m_bool_member : 1`)
146
-
* Whenever adding a function, add a comment that explains precisely:
147
-
* What the function does, under what conditions it succeeds, and how it behaves when it fails
148
-
* What the function expects as inputs, and what outputs it generates
149
-
150
-
#### Layout and style
151
-
152
-
* Indent with tabs, using a 4-space tab width.
153
-
* All curly braces should be on a line on their own. They should be indented to match the level of the construct they relate to. For example:
154
-
155
-
````
156
-
if (/* <condition> */)
157
-
{
158
-
/* <body> */
159
-
}
160
-
````
161
-
* Use a single space after the `for`, `while`, `if`, and `switch` keywords, as in the example above.
162
-
* Don't insert a space between a function or macro name and its parameter list
163
-
* Insert a single space after each comma (",")
164
-
* Insert a single space before and after binary operators (e.g. `x == y`)
165
-
* Put a single statement on each line
166
-
* Split overly-long lines (> 80 characters) appropriately. Try to place a line-break after any binary operators or commas.
167
-
* Use a single blank line to separate different areas of code with in a function.
168
-
* Use a single blank line between function and type definitions
169
-
* Separate significant areas of code with comment bars, e.g. a line containing only 80 slash characters ("/")
93
+
See the separate documentation for:
94
+
95
+
-[C++ coding style](docs/development/C++-style.md) and
96
+
[use of C++ language features](docs/development/C++-features.md)
into "[[ToolsFolder]]/Runtime/iOS/Simulator-10_0" place
612
-
executable ios:iphonesimulator10.0/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone base ios:iphonesimulator8.2/standalone-mobile[[BaseEditionTagLower]].app/standalone-mobile[[BaseEditionTagLower]]
613
-
executable ios:iphonesimulator10.0/revsecurity.ios-extension as RevSecurity base ios:iphonesimulator8.2/revsecurity.dylib
614
-
executable ios:iphonesimulator10.0/revpdfprinter.ios-extension as RevPdfPrinter base ios:iphonesimulator8.2/revpdfprinter.dylib
615
-
executable ios:iphonesimulator10.0/revzip.ios-extension as RevZip base ios:iphonesimulator8.2/revzip.dylib
616
-
executable ios:iphonesimulator10.0/revxml.ios-extension as RevXml base ios:iphonesimulator8.2/revxml.dylib
617
-
executable ios:iphonesimulator10.0/revdb.ios-extension as RevDb base ios:iphonesimulator8.2/revdb.dylib
618
-
executable ios:iphonesimulator10.0/dbsqlite.ios-extension as DbSqlite base ios:iphonesimulator8.2/dbsqlite.dylib
619
-
executable ios:iphonesimulator10.0/dbmysql.ios-extension as DbMysql base ios:iphonesimulator8.2/dbmysql.dylib
620
-
file ios:iphonesimulator10.0/mobile-template.plist as "Settings.plist"
621
-
file ios:iphonesimulator10.0/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
622
-
file ios:iphonesimulator10.0/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
623
-
file ios:iphonesimulator10.0/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
624
-
file ios:iphonesimulator10.0/mobile-disable-ats-template.plist as "DisableATS.plist"
into "[[ToolsFolder]]/Runtime/iOS/Simulator-10_2" place
616
+
executable ios:iphonesimulator10.2/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone base ios:iphonesimulator8.2/standalone-mobile[[BaseEditionTagLower]].app/standalone-mobile[[BaseEditionTagLower]]
617
+
executable ios:iphonesimulator10.2/revsecurity.ios-extension as RevSecurity base ios:iphonesimulator8.2/revsecurity.dylib
618
+
executable ios:iphonesimulator10.2/revpdfprinter.ios-extension as RevPdfPrinter base ios:iphonesimulator8.2/revpdfprinter.dylib
619
+
executable ios:iphonesimulator10.2/revzip.ios-extension as RevZip base ios:iphonesimulator8.2/revzip.dylib
620
+
executable ios:iphonesimulator10.2/revxml.ios-extension as RevXml base ios:iphonesimulator8.2/revxml.dylib
621
+
executable ios:iphonesimulator10.2/revdb.ios-extension as RevDb base ios:iphonesimulator8.2/revdb.dylib
622
+
executable ios:iphonesimulator10.2/dbsqlite.ios-extension as DbSqlite base ios:iphonesimulator8.2/dbsqlite.dylib
623
+
executable ios:iphonesimulator10.2/dbmysql.ios-extension as DbMysql base ios:iphonesimulator8.2/dbmysql.dylib
624
+
file ios:iphonesimulator10.2/mobile-template.plist as "Settings.plist"
625
+
file ios:iphonesimulator10.2/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
626
+
file ios:iphonesimulator10.2/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
627
+
file ios:iphonesimulator10.2/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
628
+
file ios:iphonesimulator10.2/mobile-disable-ats-template.plist as "DisableATS.plist"
into "[[ToolsFolder]]/Runtime/iOS/Device-10_0" place
648
-
executable ios:iphoneos10.0/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone base ios:iphoneos9.2/standalone-mobile[[BaseEditionTagLower]].lcext
649
-
executable ios:iphoneos10.0/revsecurity.ios-extension as RevSecurity base ios:iphoneos9.2/revsecurity.lcext
650
-
executable ios:iphoneos10.0/revpdfprinter.ios-extension as RevPdfPrinter base ios:iphoneos9.2/revpdfprinter.lcext
651
-
executable ios:iphoneos10.0/revzip.ios-extension as RevZip base ios:iphoneos9.2/revzip.lcext
652
-
executable ios:iphoneos10.0/revxml.ios-extension as RevXml base ios:iphoneos9.2/revxml.lcext
653
-
executable ios:iphoneos10.0/revdb.ios-extension as RevDb base ios:iphoneos9.2/revdb.lcext
654
-
executable ios:iphoneos10.0/dbsqlite.ios-extension as DbSqlite base ios:iphoneos9.2/dbsqlite.lcext
655
-
executable ios:iphoneos10.0/dbmysql.ios-extension as DbMysql base ios:iphoneos9.2/dbmysql.lcext
656
-
file ios:iphoneos10.0/mobile-device-template.plist as "Settings.plist"
657
-
file ios:iphoneos10.0/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
658
-
file ios:iphoneos10.0/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
659
-
file ios:iphoneos10.0/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
660
-
file ios:iphoneos10.0/template-entitlements.xcent as "Entitlements.xcent"
661
-
file ios:iphoneos10.0/template-beta-report-entitlement.xcent as "BetaReportEntitlement.xcent"
662
-
file ios:iphoneos10.0/template-remote-notification-entitlements.xcent as "RemoteNotificationEntitlements.xcent"
663
-
file ios:iphoneos10.0/template-remote-notification-store-entitlements.xcent as "RemoteNotificationStoreEntitlements.xcent"
664
-
file ios:iphoneos10.0/mobile-disable-ats-template.plist as "DisableATS.plist"
into "[[ToolsFolder]]/Runtime/iOS/Device-10_2" place
652
+
executable ios:iphoneos10.2/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone base ios:iphoneos9.2/standalone-mobile[[BaseEditionTagLower]].ios-engine
653
+
executable ios:iphoneos10.2/revsecurity.ios-extension as RevSecurity base ios:iphoneos9.2/revsecurity.ios-extension
654
+
executable ios:iphoneos10.2/revpdfprinter.ios-extension as RevPdfPrinter base ios:iphoneos9.2/revpdfprinter.ios-extension
655
+
executable ios:iphoneos10.2/revzip.ios-extension as RevZip base ios:iphoneos9.2/revzip.ios-extension
656
+
executable ios:iphoneos10.2/revxml.ios-extension as RevXml base ios:iphoneos9.2/revxml.ios-extension
657
+
executable ios:iphoneos10.2/revdb.ios-extension as RevDb base ios:iphoneos9.2/revdb.ios-extension
658
+
executable ios:iphoneos10.2/dbsqlite.ios-extension as DbSqlite base ios:iphoneos9.2/dbsqlite.ios-extension
659
+
executable ios:iphoneos10.2/dbmysql.ios-extension as DbMysql base ios:iphoneos9.2/dbmysql.ios-extension
660
+
file ios:iphoneos10.2/mobile-device-template.plist as "Settings.plist"
661
+
file ios:iphoneos10.2/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
662
+
file ios:iphoneos10.2/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
663
+
file ios:iphoneos10.2/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
664
+
file ios:iphoneos10.2/template-entitlements.xcent as "Entitlements.xcent"
665
+
file ios:iphoneos10.2/template-beta-report-entitlement.xcent as "BetaReportEntitlement.xcent"
666
+
file ios:iphoneos10.2/template-remote-notification-entitlements.xcent as "RemoteNotificationEntitlements.xcent"
667
+
file ios:iphoneos10.2/template-remote-notification-store-entitlements.xcent as "RemoteNotificationStoreEntitlements.xcent"
668
+
file ios:iphoneos10.2/mobile-disable-ats-template.plist as "DisableATS.plist"
0 commit comments