mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-19 14:52:40 +08:00
docs: fix spelling issues (#17564)
* fix deprecated-api.md * fix modules.md * fix CPP_CODING_STYLE.md * fix CPP_CODING_STYLE.md
This commit is contained in:
@@ -20,7 +20,7 @@ _Forked from [Google's C++ coding style](https://google.github.io/styleguide/cpp
|
||||
- [Nonmember, Static Member, and Global Functions](#nonmember-static-member-and-global-functions)
|
||||
- [Local Variables](#local-variables)
|
||||
- [Static and Global Variables](#static-and-global-variables)
|
||||
- [Decision on destrcution:](#decision-on-destrcution)
|
||||
- [Decision on destruction:](#decision-on-destrcution)
|
||||
- [Decision on initialization](#decision-on-initialization)
|
||||
- [Common patterns](#common-patterns)
|
||||
- [thread_local variables](#thread_local-variables)
|
||||
@@ -381,7 +381,7 @@ Global and static variables that use dynamic initialization or have non-trivial
|
||||
|
||||
**Decision:**
|
||||
|
||||
### Decision on destrcution:
|
||||
### Decision on destruction:
|
||||
|
||||
When destructors are trivial, their execution is not subject to ordering at all (they are effectively not "run"); otherwise we are exposed to the risk of accessing objects after the end of their lifetime. Therefore, we only allow objects with static storage duration if they are trivially destructible. Fundamental types (like pointers and int) are trivially destructible, as are arrays of trivially destructible types. Note that variables marked with constexpr are trivially destructible.
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ interface IReplacement {
|
||||
customFunction?: Function;
|
||||
/** Setter of custom replacement properties */
|
||||
customSetter?: (v: any) => void;
|
||||
/** Getter for custom replacement propertys */
|
||||
/** Getter for custom replacement properties */
|
||||
customGetter?: () => any;
|
||||
}
|
||||
|
||||
@@ -148,4 +148,4 @@ or
|
||||
```ts
|
||||
import * as cc from 'cc';
|
||||
console.log(cc.ButtonComponent);
|
||||
```
|
||||
```
|
||||
|
||||
@@ -53,6 +53,6 @@ If your API need to be in a brand new public module, you need to create the new
|
||||
Creating a public module is simply adding a module file under `/exports`.
|
||||
Then, you need some extra steps to bring your public module to users:
|
||||
|
||||
- Add an new element into `features` array in [cc.config.json](../../cc.config.json), **feature** means a feature set which might be selected by user. `modules` field indicates which public modules(see above) should be considered included while this feature is enabled. Each element of `modules` should be the extension-less file name of a public module. That JSON configuration file should have been associated with a schema file. For more fields or controls over that file, see the schema file.
|
||||
- Add a new element into `features` array in [cc.config.json](../../cc.config.json), **feature** means a feature set which might be selected by user. `modules` field indicates which public modules(see above) should be considered included while this feature is enabled. Each element of `modules` should be the extension-less file name of a public module. That JSON configuration file should have been associated with a schema file. For more fields or controls over that file, see the schema file.
|
||||
|
||||
- Navigate to [render-config.json](../../editor/engine-features/render-config.json) to configure the feature's exterior in Editor. Also there's an associated schema file.
|
||||
|
||||
Reference in New Issue
Block a user