From 54553a8cffb7b5d0692919e752e7b65f030f5e4c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 1 Jul 2019 15:26:48 +0200 Subject: [PATCH] Remove delete --- src/core/libs/gnss_sdr_supl_client.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/core/libs/gnss_sdr_supl_client.cc b/src/core/libs/gnss_sdr_supl_client.cc index fb429b7f4..1729583cd 100644 --- a/src/core/libs/gnss_sdr_supl_client.cc +++ b/src/core/libs/gnss_sdr_supl_client.cc @@ -39,10 +39,10 @@ #include #include #include // for pow -#include // for strcpy #include // for exception #include // for cerr #include // for pair +#include Gnss_Sdr_Supl_Client::Gnss_Sdr_Supl_Client() { @@ -173,14 +173,16 @@ int Gnss_Sdr_Supl_Client::get_assistance(int i_mcc, int i_mns, int i_lac, int i_ supl_set_gsm_cell(&ctx, mcc, mns, lac, ci); // PERFORM SUPL COMMUNICATION - char* cstr = new char[server_name.length() + 1]; - strcpy(cstr, server_name.c_str()); + std::vector cstr(server_name.length() + 1); + for (int i = 0; i != server_name.length(); ++i) + { + cstr[i] = static_cast(server_name[i]); + } int err; ctx.p.request = request; // select assistance info request from a pre-defined set - //std::cout<<"mcc="<