Please check this code below:
NodeScheduleLambda(this, 0.01f, [=]
{
this->removeFromParentAndCleanup(true);
});
In that what is the meaning of "[=]" this. Can any one help me.Thank you...
A lambda is an unnamed/anonymous function that is useful in programming due to it's short snippets of code.
lambda function in C++ defined like this
[]() { }
[]
is the capture list, ()
the argument list and {}
the function body.
The capture list defines what from the outside of the lambda should be available inside the function body and how. It can be either:
You're passing a lamda function as third argument using fourth capture list.
NodeScheduleLambda(this, 0.01f, [=]{ this->removeFromParentAndCleanup(true); });
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With