1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 12:10:34 +00:00

Replace C-style casts by C++ casts

This commit is contained in:
Carles Fernandez 2017-08-23 23:06:56 +02:00
parent 2c71ebf479
commit 9761803d6a
3 changed files with 9 additions and 3 deletions

View File

@ -107,6 +107,7 @@ void GlonassL1CaDllPllCAidTracking::start_tracking()
} }
} }
/* /*
* Set tracking channel unique ID * Set tracking channel unique ID
*/ */
@ -128,6 +129,7 @@ void GlonassL1CaDllPllCAidTracking::set_channel(unsigned int channel)
} }
} }
void GlonassL1CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) void GlonassL1CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro)
{ {
if (item_type_.compare("gr_complex") == 0) if (item_type_.compare("gr_complex") == 0)
@ -144,18 +146,21 @@ void GlonassL1CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchr
} }
} }
void GlonassL1CaDllPllCAidTracking::connect(gr::top_block_sptr top_block) void GlonassL1CaDllPllCAidTracking::connect(gr::top_block_sptr top_block)
{ {
if(top_block) { /* top_block is not null */}; if(top_block) { /* top_block is not null */};
//nothing to connect, now the tracking uses gr_sync_decimator //nothing to connect, now the tracking uses gr_sync_decimator
} }
void GlonassL1CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block) void GlonassL1CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block)
{ {
if(top_block) { /* top_block is not null */}; if(top_block) { /* top_block is not null */};
//nothing to disconnect, now the tracking uses gr_sync_decimator //nothing to disconnect, now the tracking uses gr_sync_decimator
} }
gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_left_block() gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_left_block()
{ {
if (item_type_.compare("gr_complex") == 0) if (item_type_.compare("gr_complex") == 0)
@ -173,6 +178,7 @@ gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_left_block()
} }
} }
gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_right_block() gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_right_block()
{ {
if (item_type_.compare("gr_complex") == 0) if (item_type_.compare("gr_complex") == 0)

View File

@ -285,7 +285,7 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_cc::general_work (int noutput_items __a
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{ {
// Block input data and block output stream pointers // Block input data and block output stream pointers
const gr_complex* in = reinterpret_cast<const gr_complex*>(input_items[0]); //PRN start block alignment const gr_complex* in = reinterpret_cast<const gr_complex*>(input_items[0]); // PRN start block alignment
Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]); Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder

View File

@ -289,8 +289,8 @@ int glonass_l1_ca_dll_pll_c_aid_tracking_sc::general_work (int noutput_items __a
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{ {
// Block input data and block output stream pointers // Block input data and block output stream pointers
const lv_16sc_t* in = (lv_16sc_t*) input_items[0]; //PRN start block alignment const lv_16sc_t* in = reinterpret_cast<const lv_16sc_t*>(input_items[0]); // PRN start block alignment
Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; Gnss_Synchro **out = reinterpret_cast<Gnss_Synchro **>(&output_items[0]);
// GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder
Gnss_Synchro current_synchro_data = Gnss_Synchro(); Gnss_Synchro current_synchro_data = Gnss_Synchro();