From bc922404438afc6cc7a9c36012266bf8e4830589 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 17 Jan 2018 19:11:42 +0100 Subject: [PATCH] Replace C-style cast by C++ casts --- .../observables/gnuradio_blocks/hybrid_observables_cc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc index 0afa10b52..efd29e092 100644 --- a/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc +++ b/src/algorithms/observables/gnuradio_blocks/hybrid_observables_cc.cc @@ -310,7 +310,7 @@ bool Hybrid_valueCompare_gnss_synchro_sample_counter(const Gnss_Synchro& a, unsi bool Hybrid_valueCompare_gnss_synchro_receiver_time(const Gnss_Synchro& a, double b) { - return (((double)a.Tracking_sample_counter+a.Code_phase_samples)/(double)a.fs) < (b); + return ((static_cast(a.Tracking_sample_counter) + static_cast(a.Code_phase_samples)) / static_cast(a.fs) ) < (b); } @@ -331,8 +331,8 @@ void hybrid_observables_cc::forecast (int noutput_items __attribute__((unused)), bool zero_samples = true; for(unsigned int i = 0; i < d_nchannels; i++) { - int items=detail()->input(i)->items_available(); - if (items>0) zero_samples = false; + int items = detail()->input(i)->items_available(); + if (items > 0) zero_samples = false; ninput_items_required[i] = items; // set the required available samples in each call }