From 3fda3dc50ad0246af62bcb85b6055291c63705da Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Sat, 11 Apr 2020 22:02:19 +0100 Subject: [PATCH] fix compilation issue --- lib/src/upper/pdcp.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/src/upper/pdcp.cc b/lib/src/upper/pdcp.cc index 7d4f69fce..88deaa5df 100644 --- a/lib/src/upper/pdcp.cc +++ b/lib/src/upper/pdcp.cc @@ -103,7 +103,9 @@ void pdcp::write_sdu_mch(uint32_t lcid, unique_byte_buffer_t sdu) void pdcp::add_bearer(uint32_t lcid, pdcp_config_t cfg) { if (not valid_lcid(lcid)) { - if (not pdcp_array.insert(std::make_pair(lcid, new pdcp_entity_lte(rlc, rrc, gw, task_executor, pdcp_log))) + if (not pdcp_array + .insert(std::make_pair( + lcid, std::unique_ptr(new pdcp_entity_lte(rlc, rrc, gw, task_executor, pdcp_log)))) .second) { pdcp_log->error("Error inserting PDCP entity in to array\n."); return; @@ -126,7 +128,9 @@ void pdcp::add_bearer(uint32_t lcid, pdcp_config_t cfg) void pdcp::add_bearer_mrb(uint32_t lcid, pdcp_config_t cfg) { if (not valid_mch_lcid(lcid)) { - if (not pdcp_array_mrb.insert(std::make_pair(lcid, new pdcp_entity_lte(rlc, rrc, gw, task_executor, pdcp_log))) + if (not pdcp_array_mrb + .insert(std::make_pair( + lcid, std::unique_ptr(new pdcp_entity_lte(rlc, rrc, gw, task_executor, pdcp_log)))) .second) { pdcp_log->error("Error inserting PDCP entity in to array\n."); return;