1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-02-19 04:20:08 +00:00

Avoid usage of double as a loop index

This commit is contained in:
Carles Fernandez 2019-08-13 13:49:30 +02:00
parent 1bfa866354
commit 0873d11407
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -244,8 +244,8 @@ void rtl_tcp_signal_source_c::set_if_gain(int gain)
{
const range &r = ranges[i];
double error = gain;
for (double g = r.start; g < r.stop; g += r.step)
double g = r.start;
while (g < r.stop)
{
double sum = 0;
for (int j = 0; j < static_cast<int>(gains.size()); j++)
@ -265,6 +265,7 @@ void rtl_tcp_signal_source_c::set_if_gain(int gain)
error = err;
gains[i + 1] = g;
}
g += r.step;;
}
}
for (unsigned stage = 1; stage <= gains.size(); stage++)