mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Remove delete
This commit is contained in:
parent
587ec66e78
commit
54553a8cff
@ -39,10 +39,10 @@
|
|||||||
#include <glog/logging.h>
|
#include <glog/logging.h>
|
||||||
#include <pugixml.hpp>
|
#include <pugixml.hpp>
|
||||||
#include <cmath> // for pow
|
#include <cmath> // for pow
|
||||||
#include <cstring> // for strcpy
|
|
||||||
#include <exception> // for exception
|
#include <exception> // for exception
|
||||||
#include <iostream> // for cerr
|
#include <iostream> // for cerr
|
||||||
#include <utility> // for pair
|
#include <utility> // for pair
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
Gnss_Sdr_Supl_Client::Gnss_Sdr_Supl_Client()
|
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);
|
supl_set_gsm_cell(&ctx, mcc, mns, lac, ci);
|
||||||
|
|
||||||
// PERFORM SUPL COMMUNICATION
|
// PERFORM SUPL COMMUNICATION
|
||||||
char* cstr = new char[server_name.length() + 1];
|
std::vector<char> cstr(server_name.length() + 1);
|
||||||
strcpy(cstr, server_name.c_str());
|
for (int i = 0; i != server_name.length(); ++i)
|
||||||
|
{
|
||||||
|
cstr[i] = static_cast<char>(server_name[i]);
|
||||||
|
}
|
||||||
|
|
||||||
int err;
|
int err;
|
||||||
ctx.p.request = request; // select assistance info request from a pre-defined set
|
ctx.p.request = request; // select assistance info request from a pre-defined set
|
||||||
|
|
||||||
//std::cout<<"mcc="<<mcc<<"mns="<<mns<<"lac="<<lac<<"ci="<<ci<<std::endl;
|
err = supl_get_assist(&ctx, cstr.data(), &assist);
|
||||||
err = supl_get_assist(&ctx, cstr, &assist);
|
|
||||||
if (err == 0)
|
if (err == 0)
|
||||||
{
|
{
|
||||||
read_supl_data();
|
read_supl_data();
|
||||||
@ -196,7 +198,6 @@ int Gnss_Sdr_Supl_Client::get_assistance(int i_mcc, int i_mns, int i_lac, int i_
|
|||||||
*/
|
*/
|
||||||
supl_close(&ctx);
|
supl_close(&ctx);
|
||||||
}
|
}
|
||||||
delete[] cstr;
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user