mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	clang-tidy: apply readability-string-compare fix (see https://clang.llvm.org/extra/clang-tidy/checks/readability-string-compare.html)
This commit is contained in:
		| @@ -130,7 +130,7 @@ GalileoE1DllPllVemlTracking::GalileoE1DllPllVemlTracking( | ||||
|     trk_param.carrier_lock_th = carrier_lock_th; | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type.compare("gr_complex") == 0) | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_ = dll_pll_veml_make_tracking(trk_param); | ||||
|   | ||||
| @@ -78,7 +78,7 @@ GalileoE1TcpConnectorTracking::GalileoE1TcpConnectorTracking( | ||||
|     vector_length = std::round(fs_in / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type.compare("gr_complex") == 0) | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_ = galileo_e1_tcp_connector_make_tracking_cc( | ||||
|   | ||||
| @@ -128,7 +128,7 @@ GalileoE5aDllPllTracking::GalileoE5aDllPllTracking( | ||||
|     trk_param.carrier_lock_th = carrier_lock_th; | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type.compare("gr_complex") == 0) | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_ = dll_pll_veml_make_tracking(trk_param); | ||||
|   | ||||
| @@ -83,7 +83,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking( | ||||
|     vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_cc = glonass_l1_ca_dll_pll_c_aid_make_tracking_cc( | ||||
| @@ -99,7 +99,7 @@ GlonassL1CaDllPllCAidTracking::GlonassL1CaDllPllCAidTracking( | ||||
|                 early_late_space_chips); | ||||
|             DLOG(INFO) << "tracking(" << tracking_cc->unique_id() << ")"; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             item_size_ = sizeof(lv_16sc_t); | ||||
|             tracking_sc = glonass_l1_ca_dll_pll_c_aid_make_tracking_sc( | ||||
| @@ -142,11 +142,11 @@ void GlonassL1CaDllPllCAidTracking::stop_tracking() | ||||
|  | ||||
| void GlonassL1CaDllPllCAidTracking::start_tracking() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             tracking_cc->start_tracking(); | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             tracking_sc->start_tracking(); | ||||
|         } | ||||
| @@ -164,11 +164,11 @@ void GlonassL1CaDllPllCAidTracking::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             tracking_cc->set_channel(channel); | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             tracking_sc->set_channel(channel); | ||||
|         } | ||||
| @@ -181,11 +181,11 @@ void GlonassL1CaDllPllCAidTracking::set_channel(unsigned int channel) | ||||
|  | ||||
| void GlonassL1CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             tracking_cc->set_gnss_synchro(p_gnss_synchro); | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             tracking_sc->set_gnss_synchro(p_gnss_synchro); | ||||
|         } | ||||
| @@ -216,11 +216,11 @@ void GlonassL1CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block) | ||||
|  | ||||
| gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_left_block() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return tracking_cc; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             return tracking_sc; | ||||
|         } | ||||
| @@ -234,11 +234,11 @@ gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_left_block() | ||||
|  | ||||
| gr::basic_block_sptr GlonassL1CaDllPllCAidTracking::get_right_block() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return tracking_cc; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             return tracking_sc; | ||||
|         } | ||||
|   | ||||
| @@ -75,7 +75,7 @@ GlonassL1CaDllPllTracking::GlonassL1CaDllPllTracking( | ||||
|     vector_length = std::round(fs_in / (GLONASS_L1_CA_CODE_RATE_HZ / GLONASS_L1_CA_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type.compare("gr_complex") == 0) | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_ = glonass_l1_ca_dll_pll_make_tracking_cc( | ||||
|   | ||||
| @@ -81,7 +81,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking( | ||||
|     vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_cc = glonass_l2_ca_dll_pll_c_aid_make_tracking_cc( | ||||
| @@ -97,7 +97,7 @@ GlonassL2CaDllPllCAidTracking::GlonassL2CaDllPllCAidTracking( | ||||
|                 early_late_space_chips); | ||||
|             DLOG(INFO) << "tracking(" << tracking_cc->unique_id() << ")"; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             item_size_ = sizeof(lv_16sc_t); | ||||
|             tracking_sc = glonass_l2_ca_dll_pll_c_aid_make_tracking_sc( | ||||
| @@ -140,11 +140,11 @@ void GlonassL2CaDllPllCAidTracking::stop_tracking() | ||||
|  | ||||
| void GlonassL2CaDllPllCAidTracking::start_tracking() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             tracking_cc->start_tracking(); | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             tracking_sc->start_tracking(); | ||||
|         } | ||||
| @@ -162,11 +162,11 @@ void GlonassL2CaDllPllCAidTracking::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             tracking_cc->set_channel(channel); | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             tracking_sc->set_channel(channel); | ||||
|         } | ||||
| @@ -179,11 +179,11 @@ void GlonassL2CaDllPllCAidTracking::set_channel(unsigned int channel) | ||||
|  | ||||
| void GlonassL2CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             tracking_cc->set_gnss_synchro(p_gnss_synchro); | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             tracking_sc->set_gnss_synchro(p_gnss_synchro); | ||||
|         } | ||||
| @@ -214,11 +214,11 @@ void GlonassL2CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block) | ||||
|  | ||||
| gr::basic_block_sptr GlonassL2CaDllPllCAidTracking::get_left_block() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return tracking_cc; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             return tracking_sc; | ||||
|         } | ||||
| @@ -232,11 +232,11 @@ gr::basic_block_sptr GlonassL2CaDllPllCAidTracking::get_left_block() | ||||
|  | ||||
| gr::basic_block_sptr GlonassL2CaDllPllCAidTracking::get_right_block() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return tracking_cc; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             return tracking_sc; | ||||
|         } | ||||
|   | ||||
| @@ -73,7 +73,7 @@ GlonassL2CaDllPllTracking::GlonassL2CaDllPllTracking( | ||||
|     vector_length = std::round(fs_in / (GLONASS_L2_CA_CODE_RATE_HZ / GLONASS_L2_CA_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type.compare("gr_complex") == 0) | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_ = glonass_l2_ca_dll_pll_make_tracking_cc( | ||||
|   | ||||
| @@ -82,7 +82,7 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking( | ||||
|     vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_cc = gps_l1_ca_dll_pll_c_aid_make_tracking_cc( | ||||
| @@ -98,7 +98,7 @@ GpsL1CaDllPllCAidTracking::GpsL1CaDllPllCAidTracking( | ||||
|                 early_late_space_chips); | ||||
|             DLOG(INFO) << "tracking(" << tracking_cc->unique_id() << ")"; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             item_size_ = sizeof(lv_16sc_t); | ||||
|             tracking_sc = gps_l1_ca_dll_pll_c_aid_make_tracking_sc( | ||||
| @@ -141,11 +141,11 @@ void GpsL1CaDllPllCAidTracking::stop_tracking() | ||||
|  | ||||
| void GpsL1CaDllPllCAidTracking::start_tracking() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             tracking_cc->start_tracking(); | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             tracking_sc->start_tracking(); | ||||
|         } | ||||
| @@ -162,11 +162,11 @@ void GpsL1CaDllPllCAidTracking::set_channel(unsigned int channel) | ||||
| { | ||||
|     channel_ = channel; | ||||
|  | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             tracking_cc->set_channel(channel); | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             tracking_sc->set_channel(channel); | ||||
|         } | ||||
| @@ -178,11 +178,11 @@ void GpsL1CaDllPllCAidTracking::set_channel(unsigned int channel) | ||||
|  | ||||
| void GpsL1CaDllPllCAidTracking::set_gnss_synchro(Gnss_Synchro* p_gnss_synchro) | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             tracking_cc->set_gnss_synchro(p_gnss_synchro); | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             tracking_sc->set_gnss_synchro(p_gnss_synchro); | ||||
|         } | ||||
| @@ -210,11 +210,11 @@ void GpsL1CaDllPllCAidTracking::disconnect(gr::top_block_sptr top_block) | ||||
|  | ||||
| gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_left_block() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return tracking_cc; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             return tracking_sc; | ||||
|         } | ||||
| @@ -227,11 +227,11 @@ gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_left_block() | ||||
|  | ||||
| gr::basic_block_sptr GpsL1CaDllPllCAidTracking::get_right_block() | ||||
| { | ||||
|     if (item_type_.compare("gr_complex") == 0) | ||||
|     if (item_type_ == "gr_complex") | ||||
|         { | ||||
|             return tracking_cc; | ||||
|         } | ||||
|     else if (item_type_.compare("cshort") == 0) | ||||
|     else if (item_type_ == "cshort") | ||||
|         { | ||||
|             return tracking_sc; | ||||
|         } | ||||
|   | ||||
| @@ -132,7 +132,7 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking( | ||||
|     trk_param.carrier_lock_th = carrier_lock_th; | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type.compare("gr_complex") == 0) | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_ = dll_pll_veml_make_tracking(trk_param); | ||||
|   | ||||
| @@ -90,7 +90,7 @@ GpsL1CaKfTracking::GpsL1CaKfTracking( | ||||
|     bce_kappa = configuration->property(role + ".bce_kappa", 0); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type.compare("gr_complex") == 0) | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_ = gps_l1_ca_kf_make_tracking_cc( | ||||
|   | ||||
| @@ -70,7 +70,7 @@ GpsL1CaTcpConnectorTracking::GpsL1CaTcpConnectorTracking( | ||||
|     vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS)); | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type.compare("gr_complex") == 0) | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_ = gps_l1_ca_tcp_connector_make_tracking_cc( | ||||
|   | ||||
| @@ -109,7 +109,7 @@ GpsL2MDllPllTracking::GpsL2MDllPllTracking( | ||||
|     trk_param.carrier_lock_th = carrier_lock_th; | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type.compare("gr_complex") == 0) | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_ = dll_pll_veml_make_tracking(trk_param); | ||||
|   | ||||
| @@ -128,7 +128,7 @@ GpsL5DllPllTracking::GpsL5DllPllTracking( | ||||
|     trk_param.carrier_lock_th = carrier_lock_th; | ||||
|  | ||||
|     //################# MAKE TRACKING GNURadio object ################### | ||||
|     if (item_type.compare("gr_complex") == 0) | ||||
|     if (item_type == "gr_complex") | ||||
|         { | ||||
|             item_size_ = sizeof(gr_complex); | ||||
|             tracking_ = dll_pll_veml_make_tracking(trk_param); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez