mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 07:13:03 +00:00 
			
		
		
		
	clang-tidy: apply performance-faster-string-find (see https://clang.llvm.org/extra/clang-tidy/checks/performance-faster-string-find.html)
This commit is contained in:
		| @@ -158,10 +158,10 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu | ||||
|         { | ||||
|             std::string dump_path; | ||||
|             // Get path | ||||
|             if (d_dump_filename.find_last_of("/") != std::string::npos) | ||||
|             if (d_dump_filename.find_last_of('/') != std::string::npos) | ||||
|                 { | ||||
|                     std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of("/") + 1); | ||||
|                     dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of("/")); | ||||
|                     std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1); | ||||
|                     dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/')); | ||||
|                     d_dump_filename = dump_filename_; | ||||
|                 } | ||||
|             else | ||||
| @@ -173,9 +173,9 @@ pcps_acquisition::pcps_acquisition(const Acq_Conf& conf_) : gr::block("pcps_acqu | ||||
|                     d_dump_filename = "acquisition"; | ||||
|                 } | ||||
|             // remove extension if any | ||||
|             if (d_dump_filename.substr(1).find_last_of(".") != std::string::npos) | ||||
|             if (d_dump_filename.substr(1).find_last_of('.') != std::string::npos) | ||||
|                 { | ||||
|                     d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of(".")); | ||||
|                     d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of('.')); | ||||
|                 } | ||||
|             d_dump_filename = dump_path + boost::filesystem::path::preferred_separator + d_dump_filename; | ||||
|             // create directory | ||||
|   | ||||
| @@ -91,10 +91,10 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con | ||||
|         { | ||||
|             std::string dump_path; | ||||
|             // Get path | ||||
|             if (d_dump_filename.find_last_of("/") != std::string::npos) | ||||
|             if (d_dump_filename.find_last_of('/') != std::string::npos) | ||||
|                 { | ||||
|                     std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of("/") + 1); | ||||
|                     dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of("/")); | ||||
|                     std::string dump_filename_ = d_dump_filename.substr(d_dump_filename.find_last_of('/') + 1); | ||||
|                     dump_path = d_dump_filename.substr(0, d_dump_filename.find_last_of('/')); | ||||
|                     d_dump_filename = dump_filename_; | ||||
|                 } | ||||
|             else | ||||
| @@ -106,9 +106,9 @@ pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(const Acq_Con | ||||
|                     d_dump_filename = "acquisition"; | ||||
|                 } | ||||
|             // remove extension if any | ||||
|             if (d_dump_filename.substr(1).find_last_of(".") != std::string::npos) | ||||
|             if (d_dump_filename.substr(1).find_last_of('.') != std::string::npos) | ||||
|                 { | ||||
|                     d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of(".")); | ||||
|                     d_dump_filename = d_dump_filename.substr(0, d_dump_filename.find_last_of('.')); | ||||
|                 } | ||||
|             d_dump_filename = dump_path + boost::filesystem::path::preferred_separator + d_dump_filename; | ||||
|             // create directory | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez