From 41c0bce51499403342ea8ad97ef8ffc8c90218f4 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 5 Dec 2022 21:44:39 +0100 Subject: [PATCH] Apply clang-tidy fix cppcoreguidelines-prefer-member-initializer --- .../galileo_e1_pcps_8ms_ambiguous_acquisition.cc | 8 ++++---- .../galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc | 8 ++++---- .../galileo_e1_pcps_quicksync_ambiguous_acquisition.cc | 8 ++++---- .../galileo_e1_pcps_tong_ambiguous_acquisition.cc | 8 ++++---- .../galileo_e5a_noncoherent_iq_acquisition_caf.cc | 9 +++++---- .../adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc | 8 ++++---- .../adapters/gps_l1_ca_pcps_assisted_acquisition.cc | 9 +++++---- .../adapters/gps_l1_ca_pcps_quicksync_acquisition.cc | 9 +++++---- .../adapters/gps_l1_ca_pcps_tong_acquisition.cc | 9 +++++---- 9 files changed, 40 insertions(+), 36 deletions(-) diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc index a4e884c6f..1e409aa80 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_8ms_ambiguous_acquisition.cc @@ -42,9 +42,11 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( role_(role), threshold_(0.0), channel_(0), + doppler_max_(configuration_->property(role + ".doppler_max", 5000)), doppler_step_(0), in_streams_(in_streams), - out_streams_(out_streams) + out_streams_(out_streams), + dump_(configuration_->property(role + ".dump", false)) { const std::string default_item_type("gr_complex"); const std::string default_dump_filename("../data/acquisition.dat"); @@ -54,10 +56,8 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( item_type_ = configuration_->property(role + ".item_type", default_item_type); - int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); + int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000LL); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); - dump_ = configuration_->property(role + ".dump", false); - doppler_max_ = configuration_->property(role + ".doppler_max", 5000); if (FLAGS_doppler_max != 0) { diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc index 747cc57e5..206ad338b 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_cccwsr_ambiguous_acquisition.cc @@ -34,9 +34,11 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition gnss_synchro_(nullptr), threshold_(0.0), channel_(0), + doppler_max_(configuration_->property(role + ".doppler_max", 5000)), doppler_step_(0), in_streams_(in_streams), - out_streams_(out_streams) + out_streams_(out_streams), + dump_(configuration_->property(role + ".dump", false)) { const std::string default_item_type("gr_complex"); const std::string default_dump_filename("../data/acquisition.dat"); @@ -45,10 +47,8 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition item_type_ = configuration_->property(role + ".item_type", default_item_type); - int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); + int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000LL); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); - dump_ = configuration_->property(role + ".dump", false); - doppler_max_ = configuration_->property(role + ".doppler_max", 5000); if (FLAGS_doppler_max != 0) { diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.cc index 2ea421377..647f9e1c3 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_quicksync_ambiguous_acquisition.cc @@ -42,9 +42,11 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui gnss_synchro_(nullptr), threshold_(0.0), channel_(0), + doppler_max_(configuration_->property(role + ".doppler_max", 5000)), doppler_step_(0), in_streams_(in_streams), - out_streams_(out_streams) + out_streams_(out_streams), + dump_(configuration_->property(role + ".dump", false)) { const std::string default_item_type("gr_complex"); const std::string default_dump_filename("../data/acquisition.dat"); @@ -54,10 +56,8 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui item_type_ = configuration_->property(role + ".item_type", default_item_type); - int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); + int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000LL); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); - dump_ = configuration_->property(role + ".dump", false); - doppler_max_ = configuration_->property(role + ".doppler_max", 5000); if (FLAGS_doppler_max != 0) { diff --git a/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc b/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc index 006159c74..6621bb18d 100644 --- a/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc +++ b/src/algorithms/acquisition/adapters/galileo_e1_pcps_tong_ambiguous_acquisition.cc @@ -42,9 +42,9 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( role_(role), threshold_(0.0), channel_(0), - doppler_step_(0), + doppler_max_(configuration_->property(role + ".doppler_max", 5000)), doppler_step_(0), in_streams_(in_streams), - out_streams_(out_streams) + out_streams_(out_streams), dump_(configuration_->property(role + ".dump", false)) { const std::string default_item_type("gr_complex"); const std::string default_dump_filename("../data/acquisition.dat"); @@ -56,8 +56,8 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 4000000); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); - dump_ = configuration_->property(role + ".dump", false); - doppler_max_ = configuration_->property(role + ".doppler_max", 5000); + + if (FLAGS_doppler_max != 0) { doppler_max_ = FLAGS_doppler_max; diff --git a/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc b/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc index 2873c43c6..9baa1ac76 100644 --- a/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc +++ b/src/algorithms/acquisition/adapters/galileo_e5a_noncoherent_iq_acquisition_caf.cc @@ -48,9 +48,11 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( gnss_synchro_(nullptr), threshold_(0.0), channel_(0), + doppler_max_(configuration_->property(role + ".doppler_max", 5000)), doppler_step_(0), in_streams_(in_streams), - out_streams_(out_streams) + out_streams_(out_streams), + dump_(configuration_->property(role + ".dump", false)) { const std::string default_item_type("gr_complex"); const std::string default_dump_filename("../data/acquisition.dat"); @@ -59,10 +61,9 @@ GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( item_type_ = configuration_->property(role + ".item_type", default_item_type); - int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000); + int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 32000000LL); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); - dump_ = configuration_->property(role + ".dump", false); - doppler_max_ = configuration_->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0) { doppler_max_ = FLAGS_doppler_max; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc index 01fdbb1b8..efa367446 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_acquisition_fine_doppler.cc @@ -32,8 +32,10 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), + doppler_max_(configuration->property(role + ".doppler_max", 5000)), in_streams_(in_streams), - out_streams_(out_streams) + out_streams_(out_streams), + dump_(configuration->property(role + ".dump", false)) { const std::string default_item_type("gr_complex"); std::string default_dump_filename = "./acquisition.mat"; @@ -42,15 +44,13 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( Acq_Conf acq_parameters = Acq_Conf(); item_type_ = configuration->property(role + ".item_type", default_item_type); - int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); + int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000LL); fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); acq_parameters.fs_in = fs_in_; acq_parameters.samples_per_chip = static_cast(ceil(GPS_L1_CA_CHIP_PERIOD_S * static_cast(acq_parameters.fs_in))); - dump_ = configuration->property(role + ".dump", false); acq_parameters.dump = dump_; dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); acq_parameters.dump_filename = dump_filename_; - doppler_max_ = configuration->property(role + ".doppler_max", 5000); if (FLAGS_doppler_max != 0) { doppler_max_ = FLAGS_doppler_max; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.cc index da6b57597..5d6e7664d 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_assisted_acquisition.cc @@ -31,8 +31,10 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( const std::string& role, unsigned int in_streams, unsigned int out_streams) : role_(role), + doppler_max_(configuration->property(role + ".doppler_max", 5000)), in_streams_(in_streams), - out_streams_(out_streams) + out_streams_(out_streams), + dump_(configuration->property(role + ".dump", false)) { const std::string default_item_type("gr_complex"); std::string default_dump_filename = "./data/acquisition.dat"; @@ -40,10 +42,9 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( DLOG(INFO) << "role " << role; item_type_ = configuration->property(role + ".item_type", default_item_type); - int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000); + int64_t fs_in_deprecated = configuration->property("GNSS-SDR.internal_fs_hz", 2048000LL); fs_in_ = configuration->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); - dump_ = configuration->property(role + ".dump", false); - doppler_max_ = configuration->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0) { doppler_max_ = FLAGS_doppler_max; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc index 56f544d86..5ed2be823 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_quicksync_acquisition.cc @@ -43,9 +43,11 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( gnss_synchro_(nullptr), threshold_(0.0), channel_(0), + doppler_max_(configuration->property(role + ".doppler_max", 5000)), doppler_step_(0), in_streams_(in_streams), - out_streams_(out_streams) + out_streams_(out_streams), + dump_(configuration_->property(role + ".dump", false)) { const std::string default_item_type("gr_complex"); std::string default_dump_filename = "./data/acquisition.dat"; @@ -53,10 +55,9 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( DLOG(INFO) << "role " << role; item_type_ = configuration_->property(role + ".item_type", default_item_type); - int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); + int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000LL); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); - dump_ = configuration_->property(role + ".dump", false); - doppler_max_ = configuration->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0) { doppler_max_ = FLAGS_doppler_max; diff --git a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc index d7b71ef97..2243760c5 100644 --- a/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc +++ b/src/algorithms/acquisition/adapters/gps_l1_ca_pcps_tong_acquisition.cc @@ -42,9 +42,11 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( role_(role), threshold_(0.0), channel_(0), + doppler_max_(configuration->property(role + ".doppler_max", 5000)), doppler_step_(0), in_streams_(in_streams), - out_streams_(out_streams) + out_streams_(out_streams), + dump_(configuration_->property(role + ".dump", false)) { const std::string default_item_type("gr_complex"); std::string default_dump_filename = "./data/acquisition.dat"; @@ -53,10 +55,9 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( item_type_ = configuration_->property(role + ".item_type", default_item_type); - int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000); + int64_t fs_in_deprecated = configuration_->property("GNSS-SDR.internal_fs_hz", 2048000LL); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); - dump_ = configuration_->property(role + ".dump", false); - doppler_max_ = configuration->property(role + ".doppler_max", 5000); + if (FLAGS_doppler_max != 0) { doppler_max_ = FLAGS_doppler_max;