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

Commit a244f820 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "SCO: Use const reference instead of const value"

parents a3d478a0 78841c85
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ void btm_sco_chk_pend_rolechange(uint16_t hci_handle) {
void btm_sco_chk_pend_unpark(tHCI_STATUS hci_status, uint16_t hci_handle) {
  mock_function_count_map[__func__]++;
}
void btm_sco_conn_req(const RawAddress& bda, DEV_CLASS dev_class,
void btm_sco_conn_req(const RawAddress& bda, const DEV_CLASS& dev_class,
                      uint8_t link_type) {
  mock_function_count_map[__func__]++;
}
+4 −2
Original line number Diff line number Diff line
@@ -50,8 +50,10 @@ typedef struct {
} acl_le_connection_interface_t;

typedef struct {
  void (*on_esco_connect_request)(const RawAddress, const types::ClassOfDevice);
  void (*on_sco_connect_request)(const RawAddress, const types::ClassOfDevice);
  void (*on_esco_connect_request)(const RawAddress&,
                                  const types::ClassOfDevice&);
  void (*on_sco_connect_request)(const RawAddress&,
                                 const types::ClassOfDevice&);
  void (*on_disconnected)(uint16_t handle, tHCI_REASON reason);
} acl_sco_connection_interface_t;

+4 −4
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ void btm_sco_chk_pend_rolechange(uint16_t hci_handle) {
void btm_sco_chk_pend_unpark(tHCI_STATUS hci_status, uint16_t hci_handle) {
  mock_function_count_map[__func__]++;
}
void btm_sco_conn_req(const RawAddress& bda, DEV_CLASS dev_class,
void btm_sco_conn_req(const RawAddress& bda, const DEV_CLASS& dev_class,
                      uint8_t link_type) {
  mock_function_count_map[__func__]++;
}
@@ -113,11 +113,11 @@ void btm_sco_disc_chk_pend_for_modechange(uint16_t hci_handle) {
  mock_function_count_map[__func__]++;
}
void btm_sco_on_esco_connect_request(
    const RawAddress bda, const bluetooth::types::ClassOfDevice cod) {
    const RawAddress& bda, const bluetooth::types::ClassOfDevice& cod) {
  mock_function_count_map[__func__]++;
}
void btm_sco_on_sco_connect_request(const RawAddress bda,
                                    const bluetooth::types::ClassOfDevice cod) {
void btm_sco_on_sco_connect_request(
    const RawAddress& bda, const bluetooth::types::ClassOfDevice& cod) {
  mock_function_count_map[__func__]++;
}
void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason) {
+4 −4
Original line number Diff line number Diff line
@@ -588,7 +588,7 @@ void btm_sco_disc_chk_pend_for_modechange(uint16_t hci_handle) {
 * Returns          void
 *
 ******************************************************************************/
void btm_sco_conn_req(const RawAddress& bda, const DEV_CLASS dev_class,
void btm_sco_conn_req(const RawAddress& bda, const DEV_CLASS& dev_class,
                      uint8_t link_type) {
  tSCO_CB* p_sco = &btm_cb.sco_cb;
  tSCO_CONN* p = &p_sco->sco_db[0];
@@ -877,14 +877,14 @@ bool btm_sco_removed(uint16_t hci_handle, tHCI_REASON reason) {
}

void btm_sco_on_esco_connect_request(
    const RawAddress bda, const bluetooth::types::ClassOfDevice cod) {
    const RawAddress& bda, const bluetooth::types::ClassOfDevice& cod) {
  LOG_DEBUG("Remote ESCO connect request remote:%s cod:%s",
            PRIVATE_ADDRESS(bda), cod.ToString().c_str());
  btm_sco_conn_req(bda, cod.cod, BTM_LINK_TYPE_ESCO);
}

void btm_sco_on_sco_connect_request(const RawAddress bda,
                                    const bluetooth::types::ClassOfDevice cod) {
void btm_sco_on_sco_connect_request(
    const RawAddress& bda, const bluetooth::types::ClassOfDevice& cod) {
  LOG_DEBUG("Remote SCO connect request remote:%s cod:%s", PRIVATE_ADDRESS(bda),
            cod.ToString().c_str());
  btm_sco_conn_req(bda, cod.cod, BTM_LINK_TYPE_SCO);
+5 −5
Original line number Diff line number Diff line
@@ -31,14 +31,14 @@ extern void btm_esco_proc_conn_chg(uint8_t status, uint16_t handle,
extern bool btm_is_sco_active(uint16_t handle);
extern void btm_sco_chk_pend_unpark(tHCI_STATUS hci_status,
                                    uint16_t hci_handle);
extern void btm_sco_conn_req(const RawAddress& bda, const DEV_CLASS dev_class,
extern void btm_sco_conn_req(const RawAddress& bda, const DEV_CLASS& dev_class,
                             uint8_t link_type);
extern void btm_sco_connected(tHCI_STATUS hci_status, const RawAddress& bda,
                              uint16_t hci_handle, tBTM_ESCO_DATA* p_esco_data);
extern bool btm_sco_removed(uint16_t hci_handle, tHCI_REASON reason);

void btm_sco_on_disconnected(uint16_t hci_handle, tHCI_REASON reason);
void btm_sco_on_esco_connect_request(const RawAddress,
                                     const bluetooth::types::ClassOfDevice);
void btm_sco_on_sco_connect_request(const RawAddress,
                                    const bluetooth::types::ClassOfDevice);
void btm_sco_on_esco_connect_request(const RawAddress&,
                                     const bluetooth::types::ClassOfDevice&);
void btm_sco_on_sco_connect_request(const RawAddress&,
                                    const bluetooth::types::ClassOfDevice&);