diff --git a/src/algorithms/signal_source/libs/fpga_dynamic_bit_selection.cc b/src/algorithms/signal_source/libs/fpga_dynamic_bit_selection.cc index 583fbfe0c..1802324c5 100644 --- a/src/algorithms/signal_source/libs/fpga_dynamic_bit_selection.cc +++ b/src/algorithms/signal_source/libs/fpga_dynamic_bit_selection.cc @@ -69,7 +69,7 @@ Fpga_dynamic_bit_selection::~Fpga_dynamic_bit_selection() } -void Fpga_dynamic_bit_selection::bit_selection(void) +void Fpga_dynamic_bit_selection::bit_selection() { // estimated signal power corresponding to frequency band 1 uint32_t rx_signal_power1 = d_map_base1[1]; diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc index b0192f26e..c5b224f5f 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.cc @@ -1297,7 +1297,7 @@ int32_t dll_pll_veml_tracking_fpga::save_matfile() const } -void dll_pll_veml_tracking_fpga::set_channel(uint32_t channel, std::string device_io_name) +void dll_pll_veml_tracking_fpga::set_channel(uint32_t channel, const std::string& device_io_name) { gr::thread::scoped_lock l(d_setlock); diff --git a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h index 9233f2715..3a2c863a9 100644 --- a/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h +++ b/src/algorithms/tracking/gnuradio_blocks/dll_pll_veml_tracking_fpga.h @@ -66,7 +66,7 @@ public: /*! * \brief Set the channel number and configure some multicorrelator parameters */ - void set_channel(uint32_t channel, std::string device_io_name); + void set_channel(uint32_t channel, const std::string& device_io_name); /*! * \brief This function is used with two purposes: diff --git a/src/algorithms/tracking/libs/fpga_multicorrelator.cc b/src/algorithms/tracking/libs/fpga_multicorrelator.cc index a962dfbe1..edb87a375 100644 --- a/src/algorithms/tracking/libs/fpga_multicorrelator.cc +++ b/src/algorithms/tracking/libs/fpga_multicorrelator.cc @@ -192,7 +192,7 @@ bool Fpga_Multicorrelator_8sc::free() } -void Fpga_Multicorrelator_8sc::open_channel(std::string device_io_name, uint32_t channel) +void Fpga_Multicorrelator_8sc::open_channel(const std::string& device_io_name, uint32_t channel) { std::cout << "trk device_io_name = " << device_io_name << '\n'; diff --git a/src/algorithms/tracking/libs/fpga_multicorrelator.h b/src/algorithms/tracking/libs/fpga_multicorrelator.h index f67520f63..42fa151b9 100644 --- a/src/algorithms/tracking/libs/fpga_multicorrelator.h +++ b/src/algorithms/tracking/libs/fpga_multicorrelator.h @@ -91,7 +91,7 @@ public: /*! * \brief Open the FPGA device driver */ - void open_channel(std::string device_io_name, uint32_t channel); + void open_channel(const std::string& device_io_name, uint32_t channel); /*! * \brief Set the initial sample number where the tracking process begins diff --git a/src/core/libs/uio_fpga.cc b/src/core/libs/uio_fpga.cc index 14156a654..647ec846e 100644 --- a/src/core/libs/uio_fpga.cc +++ b/src/core/libs/uio_fpga.cc @@ -32,7 +32,10 @@ int32_t get_uio_num(std::string uio_name) // search first digit for (; i < uio_name.length(); i++) { - if (isdigit(uio_name[i])) break; + if (isdigit(uio_name[i])) + { + break; + } } // remove the first chars, which aren't digits @@ -137,7 +140,7 @@ int my_strverscmp(const char *s1, const char *s2) } -bool sort_directories(fs::directory_entry a, fs::directory_entry b) +bool sort_directories(const fs::directory_entry &a, const fs::directory_entry &b) { int cmp = my_strverscmp(a.path().string().c_str(), b.path().string().c_str()); return (cmp < 0); @@ -166,7 +169,7 @@ int32_t find_uio_num(const std::string &device_name, uint32_t device_num) { std::string nametemp; get_uio_name(uio_num, nametemp); - if (device_name.compare(nametemp) == 0) + if (device_name == nametemp) { if (uio_count == device_num) {