Skip to content

Instantly share code, notes, and snippets.

@bayoubengal
Created March 23, 2018 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bayoubengal/21757b0ddca12e594b4b0f93c65520a7 to your computer and use it in GitHub Desktop.
Save bayoubengal/21757b0ddca12e594b4b0f93c65520a7 to your computer and use it in GitHub Desktop.
auto tmpBindingsItr = std::back_inserter(self->mBindingsBag);
tmpBindingsItr = make_lambda_binding_sptr(FPConsoleState.instance, @"flags", dispatch_get_main_queue(), [capSelfWPtr = self.wptr, _cmd](uint16_t theValue) mutable
{
auto tmpSelfSPtr = lock_wptr<decltype(*self)>(capSelfWPtr);
if( unwrap(tmpSelfSPtr) == nullptr)
{
return;
}
[ unwrap(tmpSelfSPtr) updateFlags: theValue];
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment