[*] Here wasn't the best place to demo AuUnsafeRaiiToShared
This commit is contained in:
parent
1d158614bd
commit
a398b4eb24
@ -52,14 +52,11 @@ static AuSPtr<IInputMouseSubscriber> MyMouseSubscriber()
|
|||||||
#### Usage: Runtime bindings and modern C++
|
#### Usage: Runtime bindings and modern C++
|
||||||
``` c++
|
``` c++
|
||||||
// My language binding
|
// My language binding
|
||||||
IInputMouseSubscriberFunctional test;
|
auto test = AuMakeShared<IInputMouseSubscriberFunctional>();
|
||||||
test.onButtonPress = [](AuUInt8 btn)
|
test->onButtonPress = [](AuUInt8 btn)
|
||||||
{
|
{
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
AuSPtr<IInputMouseSubscriber> handle = AuUnsafeRaiiToShared(&test);
|
|
||||||
// use handle with an Aurora API
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
Loading…
Reference in New Issue
Block a user