From 7c9f824e29c392f3b740505059abeeaaa1b609b2 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 10 Dec 2018 18:12:14 +0100 Subject: [PATCH] Apply clang-tidy fixes --- .../adapters/galileo_e1_pcps_ambiguous_acquisition.cc | 2 +- .../acquisition/adapters/galileo_e5a_pcps_acquisition.cc | 2 +- .../acquisition/adapters/gps_l1_ca_pcps_acquisition.cc | 2 +- .../acquisition/adapters/gps_l2_m_pcps_acquisition.cc | 2 +- src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc | 2 +- src/algorithms/channel/adapters/channel.cc | 2 +- src/tests/system-tests/position_test.cc | 1 + .../signal-processing-blocks/tracking/tracking_pull-in_test.cc | 2 +- 8 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc index 585b5eacb..79e25061c 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_ambiguous_acquisition.cc @@ -88,7 +88,7 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( acq_parameters_.dump_filename = dump_filename_; acq_parameters_.use_automatic_resampler = configuration_->property("GNSS-SDR.use_acquisition_resampler", false); - if (acq_parameters_.use_automatic_resampler == true and item_type_.compare("gr_complex") != 0) + if (acq_parameters_.use_automatic_resampler == true and item_type_ != "gr_complex") { LOG(WARNING) << "Galileo E1 acqisition disabled the automatic resampler feature because its item_type is not set to gr_complex"; acq_parameters_.use_automatic_resampler = false; diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc index 466e7c231..4b7abfc8f 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e5a_pcps_acquisition.cc @@ -86,7 +86,7 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con acq_parameters_.use_automatic_resampler = configuration_->property("GNSS-SDR.use_acquisition_resampler", false); - if (acq_parameters_.use_automatic_resampler == true and item_type_.compare("gr_complex") != 0) + if (acq_parameters_.use_automatic_resampler == true and item_type_ != "gr_complex") { LOG(WARNING) << "Galileo E5a acquisition disabled the automatic resampler feature because its item_type is not set to gr_complex"; acq_parameters_.use_automatic_resampler = false; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc index 3cdb92ad7..ce0ea4065 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition.cc @@ -87,7 +87,7 @@ GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( acq_parameters_.doppler_step2 = configuration_->property(role + ".second_doppler_step", 125.0); acq_parameters_.make_2_steps = configuration_->property(role + ".make_two_steps", false); acq_parameters_.use_automatic_resampler = configuration_->property("GNSS-SDR.use_acquisition_resampler", false); - if (acq_parameters_.use_automatic_resampler == true and item_type_.compare("gr_complex") != 0) + if (acq_parameters_.use_automatic_resampler == true and item_type_ != "gr_complex") { LOG(WARNING) << "GPS L1 CA acquisition disabled the automatic resampler feature because its item_type is not set to gr_complex"; acq_parameters_.use_automatic_resampler = false; diff --git a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc index 596221516..dcf663121 100644 --- a/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l2_m_pcps_acquisition.cc @@ -91,7 +91,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( acq_parameters_.make_2_steps = configuration_->property(role + ".make_two_steps", false); acq_parameters_.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false); acq_parameters_.use_automatic_resampler = configuration_->property("GNSS-SDR.use_acquisition_resampler", false); - if (acq_parameters_.use_automatic_resampler == true and item_type_.compare("gr_complex") != 0) + if (acq_parameters_.use_automatic_resampler == true and item_type_ != "gr_complex") { LOG(WARNING) << "GPS L2CM acquisition disabled the automatic resampler feature because its item_type is not set to gr_complex"; acq_parameters_.use_automatic_resampler = false; diff --git a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc index 8c3636277..f436da1d4 100644 --- a/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l5i_pcps_acquisition.cc @@ -98,7 +98,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( acq_parameters_.make_2_steps = configuration_->property(role + ".make_two_steps", false); acq_parameters_.blocking_on_standby = configuration_->property(role + ".blocking_on_standby", false); acq_parameters_.use_automatic_resampler = configuration_->property("GNSS-SDR.use_acquisition_resampler", false); - if (acq_parameters_.use_automatic_resampler == true and item_type_.compare("gr_complex") != 0) + if (acq_parameters_.use_automatic_resampler == true and item_type_ != "gr_complex") { LOG(WARNING) << "GPS L5 acquisition disabled the automatic resampler feature because its item_type is not set to gr_complex"; acq_parameters_.use_automatic_resampler = false; diff --git a/src/algorithms/channel/adapters/channel.cc b/src/algorithms/channel/adapters/channel.cc index c39330521..946f17a65 100644 --- a/src/algorithms/channel/adapters/channel.cc +++ b/src/algorithms/channel/adapters/channel.cc @@ -146,7 +146,7 @@ void Channel::disconnect(gr::top_block_sptr top_block) gr::basic_block_sptr Channel::get_left_block() { LOG(ERROR) << "Deprecated call to get_left_block() in channel interface"; - return NULL; + return nullptr; } gr::basic_block_sptr Channel::get_left_block_trk() diff --git a/src/tests/system-tests/position_test.cc b/src/tests/system-tests/position_test.cc index 01dca3bbb..202f31306 100644 --- a/src/tests/system-tests/position_test.cc +++ b/src/tests/system-tests/position_test.cc @@ -33,6 +33,7 @@ */ #include "MATH_CONSTANTS.h" +#include "acquisition_msg_rx.h" #include "concurrent_map.h" #include "concurrent_queue.h" #include "control_thread.h" diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc index 46cb20827..2d9861d6f 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/tracking_pull-in_test.cc @@ -30,12 +30,12 @@ * ------------------------------------------------------------------------- */ - #include "GPS_L1_CA.h" #include "GPS_L2C.h" #include "GPS_L5.h" #include "Galileo_E1.h" #include "Galileo_E5a.h" +#include "acquisition_msg_rx.h" #include "control_message_factory.h" #include "galileo_e1_pcps_ambiguous_acquisition.h" #include "galileo_e5a_noncoherent_iq_acquisition_caf.h"