Merge "acl manager Move from reference to const reference"
diff --git a/gd/hci/acl_manager.cc b/gd/hci/acl_manager.cc
index 0e1ad45..2852b6c 100644
--- a/gd/hci/acl_manager.cc
+++ b/gd/hci/acl_manager.cc
@@ -56,7 +56,7 @@
};
struct AclManager::impl {
- impl(AclManager& acl_manager) : acl_manager_(acl_manager) {}
+ impl(const AclManager& acl_manager) : acl_manager_(acl_manager) {}
void Start() {
hci_layer_ = acl_manager_.GetDependency<HciLayer>();
@@ -1580,7 +1580,7 @@
handler_->Post(BindOnce(&impl::cleanup, common::Unretained(this), handle));
}
- AclManager& acl_manager_;
+ const AclManager& acl_manager_;
Controller* controller_ = nullptr;
uint16_t max_acl_packet_credits_ = 0;
diff --git a/gd/hci/acl_manager.h b/gd/hci/acl_manager.h
index 9a0b279..27c4fb3 100644
--- a/gd/hci/acl_manager.h
+++ b/gd/hci/acl_manager.h
@@ -150,11 +150,11 @@
private:
friend AclManager;
- AclConnection(AclManager* manager, uint16_t handle, Address address)
+ AclConnection(const AclManager* manager, uint16_t handle, Address address)
: manager_(manager), handle_(handle), address_(address) {}
- AclConnection(AclManager* manager, uint16_t handle, Address address, AddressType address_type, Role role)
+ AclConnection(const AclManager* manager, uint16_t handle, Address address, AddressType address_type, Role role)
: manager_(manager), handle_(handle), address_(address), address_type_(address_type), role_(role) {}
- AclManager* manager_;
+ const AclManager* manager_;
uint16_t handle_;
Address address_;
AddressType address_type_;