1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-14 12:10:34 +00:00

Apply clang-tidy fixes when -DENABLE_FPGA=ON

This commit is contained in:
Carles Fernandez 2021-01-25 22:07:59 +01:00
parent 419eff9424
commit d6d1fff743
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
6 changed files with 11 additions and 8 deletions

View File

@ -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 // estimated signal power corresponding to frequency band 1
uint32_t rx_signal_power1 = d_map_base1[1]; uint32_t rx_signal_power1 = d_map_base1[1];

View File

@ -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); gr::thread::scoped_lock l(d_setlock);

View File

@ -66,7 +66,7 @@ public:
/*! /*!
* \brief Set the channel number and configure some multicorrelator parameters * \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: * \brief This function is used with two purposes:

View File

@ -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'; std::cout << "trk device_io_name = " << device_io_name << '\n';

View File

@ -91,7 +91,7 @@ public:
/*! /*!
* \brief Open the FPGA device driver * \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 * \brief Set the initial sample number where the tracking process begins

View File

@ -32,7 +32,10 @@ int32_t get_uio_num(std::string uio_name)
// search first digit // search first digit
for (; i < uio_name.length(); i++) 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 // 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()); int cmp = my_strverscmp(a.path().string().c_str(), b.path().string().c_str());
return (cmp < 0); return (cmp < 0);
@ -166,7 +169,7 @@ int32_t find_uio_num(const std::string &device_name, uint32_t device_num)
{ {
std::string nametemp; std::string nametemp;
get_uio_name(uio_num, nametemp); get_uio_name(uio_num, nametemp);
if (device_name.compare(nametemp) == 0) if (device_name == nametemp)
{ {
if (uio_count == device_num) if (uio_count == device_num)
{ {