mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-12 05:13:04 +00:00
clang-tidy: apply readability-else-after-return fix (see https://clang.llvm.org/extra/clang-tidy/checks/readability-else-after-return.html)
This commit is contained in:
@@ -126,28 +126,26 @@ double rtl_tcp_dongle_info::clip_gain(int gain) const
|
||||
// no defined gains to clip to
|
||||
return gain;
|
||||
}
|
||||
else
|
||||
{
|
||||
double last_stop = gains.front();
|
||||
BOOST_FOREACH (double g, gains)
|
||||
{
|
||||
g /= 10.0;
|
||||
|
||||
if (gain < g)
|
||||
double last_stop = gains.front();
|
||||
BOOST_FOREACH (double g, gains)
|
||||
{
|
||||
g /= 10.0;
|
||||
|
||||
if (gain < g)
|
||||
{
|
||||
if (std::abs(gain - g) < std::abs(gain - last_stop))
|
||||
{
|
||||
if (std::abs(gain - g) < std::abs(gain - last_stop))
|
||||
{
|
||||
return g;
|
||||
}
|
||||
else
|
||||
{
|
||||
return last_stop;
|
||||
}
|
||||
return g;
|
||||
}
|
||||
else
|
||||
{
|
||||
return last_stop;
|
||||
}
|
||||
last_stop = g;
|
||||
}
|
||||
return last_stop;
|
||||
last_stop = g;
|
||||
}
|
||||
return last_stop;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user