From 9eb46cc13493e68cca26713bb6e05f2af7d4b0d6 Mon Sep 17 00:00:00 2001 From: Francisco Date: Fri, 26 Feb 2021 13:59:40 +0000 Subject: [PATCH] fixed clang tidy warnings in mac::ue.cc --- srsenb/hdr/stack/mac/ue.h | 12 ++++++------ srsenb/src/stack/mac/ue.cc | 26 +++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/srsenb/hdr/stack/mac/ue.h b/srsenb/hdr/stack/mac/ue.h index 76ec7a933..b814e942d 100644 --- a/srsenb/hdr/stack/mac/ue.h +++ b/srsenb/hdr/stack/mac/ue.h @@ -63,12 +63,12 @@ public: void tic(); - uint8_t* generate_pdu(uint32_t ue_cc_idx, - uint32_t harq_pid, - uint32_t tb_idx, - sched_interface::dl_sched_pdu_t pdu[sched_interface::MAX_RLC_PDU_LIST], - uint32_t nof_pdu_elems, - uint32_t grant_size); + uint8_t* generate_pdu(uint32_t ue_cc_idx, + uint32_t harq_pid, + uint32_t tb_idx, + const sched_interface::dl_sched_pdu_t pdu[sched_interface::MAX_RLC_PDU_LIST], + uint32_t nof_pdu_elems, + uint32_t grant_size); uint8_t* generate_mch_pdu(uint32_t harq_pid, sched_interface::dl_pdu_mch_t sched, uint32_t nof_pdu_elems, uint32_t grant_size); diff --git a/srsenb/src/stack/mac/ue.cc b/srsenb/src/stack/mac/ue.cc index 67a263cd2..032bd261a 100644 --- a/srsenb/src/stack/mac/ue.cc +++ b/srsenb/src/stack/mac/ue.cc @@ -496,12 +496,12 @@ void ue::allocate_ce(srslte::sch_pdu* pdu, uint32_t lcid) } } -uint8_t* ue::generate_pdu(uint32_t ue_cc_idx, - uint32_t harq_pid, - uint32_t tb_idx, - sched_interface::dl_sched_pdu_t pdu[sched_interface::MAX_RLC_PDU_LIST], - uint32_t nof_pdu_elems, - uint32_t grant_size) +uint8_t* ue::generate_pdu(uint32_t ue_cc_idx, + uint32_t harq_pid, + uint32_t tb_idx, + const sched_interface::dl_sched_pdu_t pdu[sched_interface::MAX_RLC_PDU_LIST], + uint32_t nof_pdu_elems, + uint32_t grant_size) { std::lock_guard lock(mutex); uint8_t* ret = nullptr; @@ -529,7 +529,7 @@ uint8_t* ue::generate_pdu(uint32_t ue_cc_idx, } uint8_t* ue::generate_mch_pdu(uint32_t harq_pid, - sched_interface::dl_pdu_mch_t sched, + sched_interface::dl_pdu_mch_t sched_, uint32_t nof_pdu_elems, uint32_t grant_size) { @@ -539,15 +539,15 @@ uint8_t* ue::generate_mch_pdu(uint32_t harq_pid, mch_mac_msg_dl.init_tx(tx_payload_buffer[0][harq_pid][0].get(), grant_size); for (uint32_t i = 0; i < nof_pdu_elems; i++) { - if (sched.pdu[i].lcid == (uint32_t)srslte::mch_lcid::MCH_SCHED_INFO) { + if (sched_.pdu[i].lcid == (uint32_t)srslte::mch_lcid::MCH_SCHED_INFO) { mch_mac_msg_dl.new_subh(); - mch_mac_msg_dl.get()->set_next_mch_sched_info(sched.mtch_sched[i].lcid, sched.mtch_sched[i].stop); - } else if (sched.pdu[i].lcid == 0) { + mch_mac_msg_dl.get()->set_next_mch_sched_info(sched_.mtch_sched[i].lcid, sched_.mtch_sched[i].stop); + } else if (sched_.pdu[i].lcid == 0) { mch_mac_msg_dl.new_subh(); - mch_mac_msg_dl.get()->set_sdu(0, sched.pdu[i].nbytes, sched.mcch_payload); - } else if (sched.pdu[i].lcid <= (uint32_t)srslte::mch_lcid::MTCH_MAX_LCID) { + mch_mac_msg_dl.get()->set_sdu(0, sched_.pdu[i].nbytes, sched_.mcch_payload); + } else if (sched_.pdu[i].lcid <= (uint32_t)srslte::mch_lcid::MTCH_MAX_LCID) { mch_mac_msg_dl.new_subh(); - mch_mac_msg_dl.get()->set_sdu(sched.pdu[i].lcid, sched.pdu[i].nbytes, sched.mtch_sched[i].mtch_payload); + mch_mac_msg_dl.get()->set_sdu(sched_.pdu[i].lcid, sched_.pdu[i].nbytes, sched_.mtch_sched[i].mtch_payload); } }