Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c36810d6 authored by Chris Manton's avatar Chris Manton
Browse files

Explicit pass in this pointer to lambda closures

Bug: 331689395
Test: m .
Flag: EXEMPT, Compiler Convention

Change-Id: Ia451845bc6a8fd6ee630ca2b90c72efb790d991f
parent 98048d8d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -353,7 +353,7 @@ struct classic_impl : public security::ISecurityManagerListener {
        queue_down_end,
        handler_,
        connection->GetEventCallbacks([this](uint16_t handle) { this->connections.invalidate(handle); }));
    connections.execute(address, [=](ConnectionManagementCallbacks* callbacks) {
    connections.execute(address, [=, this](ConnectionManagementCallbacks* callbacks) {
      if (delayed_role_change_ == nullptr) {
        callbacks->OnRoleChange(hci::ErrorCode::SUCCESS, current_role);
      } else if (delayed_role_change_->GetBdAddr() == address) {
@@ -436,7 +436,7 @@ struct classic_impl : public security::ISecurityManagerListener {
    connections.crash_on_unknown_handle_ = false;
    connections.execute(
        handle,
        [=](ConnectionManagementCallbacks* callbacks) {
        [=, this](ConnectionManagementCallbacks* callbacks) {
          round_robin_scheduler_->Unregister(handle);
          callbacks->OnDisconnection(reason);
        },
+2 −2
Original line number Diff line number Diff line
@@ -533,7 +533,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
    connections.crash_on_unknown_handle_ = false;
    connections.execute(
        handle,
        [=](LeConnectionManagementCallbacks* callbacks) {
        [=, this](LeConnectionManagementCallbacks* callbacks) {
          round_robin_scheduler_->Unregister(handle);
          callbacks->OnDisconnection(reason);
        },
@@ -609,7 +609,7 @@ struct le_impl : public bluetooth::hci::LeAddressManagerCallback {
    }

    auto handle = request_view.GetConnectionHandle();
    connections.execute(handle, [=](LeConnectionManagementCallbacks* /* callbacks */) {
    connections.execute(handle, [=, this](LeConnectionManagementCallbacks* /* callbacks */) {
      // TODO: this is blindly accepting any parameters, just so we don't hang connection
      // have proper parameter negotiation
      le_acl_connection_interface_->EnqueueCommand(