From 9761803d6aa45fe89d22d54b4d365f44d8db8006 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 23 Aug 2017 23:06:56 +0200 Subject: [PATCH] Replace C-style casts by C++ casts --- .../adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc | 6 ++++++ .../glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc | 2 +- .../glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc index 6f9bf340a..4f73fa200 100644 --- a/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc +++ b/src/algorithms/tracking/adapters/glonass_l1_ca_dll_pll_c_aid_tracking.cc @@ -107,6 +107,7 @@ void GlonassL1CaDllPllCAidTracking::start_tracking() } } + /* * 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) { 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) { if(top_block) { /* top_block is not null */}; //nothing to connect, now the tracking uses gr_sync_decimator } + void GlonassL1CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block) { if(top_block) { /* top_block is not null */}; //nothing to disconnect, now the tracking uses gr_sync_decimator } + gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_left_block() { 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() { if (item_type_.compare("gr_complex") == 0) diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc index 0972b3382..fb48e295b 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_cc.cc @@ -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) { // Block input data and block output stream pointers - const gr_complex* in = reinterpret_cast(input_items[0]); //PRN start block alignment + const gr_complex* in = reinterpret_cast(input_items[0]); // PRN start block alignment Gnss_Synchro **out = reinterpret_cast(&output_items[0]); // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder diff --git a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc index f22bbc732..621df090d 100644 --- a/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc +++ b/src/algorithms/tracking/gnuradio_blocks/glonass_l1_ca_dll_pll_c_aid_tracking_sc.cc @@ -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) { // Block input data and block output stream pointers - const lv_16sc_t* in = (lv_16sc_t*) input_items[0]; //PRN start block alignment - Gnss_Synchro **out = (Gnss_Synchro **) &output_items[0]; + const lv_16sc_t* in = reinterpret_cast(input_items[0]); // PRN start block alignment + Gnss_Synchro **out = reinterpret_cast(&output_items[0]); // GNSS_SYNCHRO OBJECT to interchange data between tracking->telemetry_decoder Gnss_Synchro current_synchro_data = Gnss_Synchro();