From 7edb8793f2d595f84a1640d9e1e00cd8397f7ff7 Mon Sep 17 00:00:00 2001 From: Eduardo Almeida Date: Fri, 12 May 2023 14:44:23 +0000 Subject: [PATCH] wifi, wimax: Fix modernize-use-emplace warnings (clang-tidy-16) --- src/wifi/model/ctrl-headers.cc | 10 ++++++---- src/wimax/model/bs-scheduler-rtps.cc | 2 +- src/wimax/model/bs-scheduler-simple.cc | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/wifi/model/ctrl-headers.cc b/src/wifi/model/ctrl-headers.cc index ef39ce7ef..2cc36b511 100644 --- a/src/wifi/model/ctrl-headers.cc +++ b/src/wifi/model/ctrl-headers.cc @@ -458,10 +458,12 @@ CtrlBAckResponseHeader::SetType(BlockAckType type) for (auto& bitmapLen : m_baType.m_bitmapLen) { - m_baInfo.push_back({.m_aidTidInfo = 0, - .m_startingSeq = 0, - .m_bitmap = std::vector(bitmapLen, 0), - .m_ra = Mac48Address()}); + BaInfoInstance baInfoInstance{.m_aidTidInfo = 0, + .m_startingSeq = 0, + .m_bitmap = std::vector(bitmapLen, 0), + .m_ra = Mac48Address()}; + + m_baInfo.emplace_back(baInfoInstance); } } diff --git a/src/wimax/model/bs-scheduler-rtps.cc b/src/wimax/model/bs-scheduler-rtps.cc index 569a765ed..06b0ce945 100644 --- a/src/wimax/model/bs-scheduler-rtps.cc +++ b/src/wimax/model/bs-scheduler-rtps.cc @@ -111,7 +111,7 @@ BSSchedulerRtps::AddDownlinkBurst(Ptr connection, } NS_LOG_INFO(", modulation: " << modulationType << ", DIUC: " << (uint32_t)diuc); - m_downlinkBursts->push_back(std::make_pair(dlMapIe, burst)); + m_downlinkBursts->emplace_back(dlMapIe, burst); } /** diff --git a/src/wimax/model/bs-scheduler-simple.cc b/src/wimax/model/bs-scheduler-simple.cc index 3cca7acfc..60dfff52f 100644 --- a/src/wimax/model/bs-scheduler-simple.cc +++ b/src/wimax/model/bs-scheduler-simple.cc @@ -109,7 +109,7 @@ BSSchedulerSimple::AddDownlinkBurst(Ptr connection, } NS_LOG_INFO(", modulation: " << modulationType << ", DIUC: " << (uint32_t)diuc); - m_downlinkBursts->push_back(std::make_pair(dlMapIe, burst)); + m_downlinkBursts->emplace_back(dlMapIe, burst); } void