mirror of
https://github.com/SpaceManiac/SpacemanDMM.git
synced 2025-12-23 05:36:47 +00:00
Update README for 'final' keyword tweak
This commit is contained in:
parent
34e64cb2e8
commit
b3d331b18a
1 changed files with 4 additions and 4 deletions
|
|
@ -54,13 +54,13 @@ be enabled:
|
|||
#define SHOULD_CALL_PARENT(X) set SpacemanDMM_should_call_parent = X
|
||||
#define UNLINT(X) SpacemanDMM_unlint(X)
|
||||
#define SHOULD_NOT_OVERRIDE(X) set SpacemanDMM_should_not_override = X
|
||||
#define FINAL_VAR var/final
|
||||
#define VAR_FINAL var/SpacemanDMM_final
|
||||
#else
|
||||
#define RETURN_TYPE(X)
|
||||
#define SHOULD_CALL_PARENT(X)
|
||||
#define UNLINT(X) X
|
||||
#define SHOULD_NOT_OVERRIDE(X)
|
||||
#define FINAL_VAR var
|
||||
#define VAR_FINAL var
|
||||
#endif
|
||||
```
|
||||
|
||||
|
|
@ -94,8 +94,8 @@ This functions in a similar way to the `final` keyword in some languages.
|
|||
|
||||
### Final variables
|
||||
|
||||
Use the above definition of FINAL_VAR to declare vars as `final`, `var/final/foo` such that overriding their value isn't permitted by types that inherit it.
|
||||
Use the above definition of VAR_FINAL to declare vars as `final`, `var/final/foo` such that overriding their value isn't permitted by types that inherit it.
|
||||
```
|
||||
/a/type
|
||||
FINAL_VAR/foo = somevalue
|
||||
VAR_FINAL/foo = somevalue
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue