mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-21 05:20:37 +00:00
clang-tidy: apply readability-else-after-return check
See https://clang.llvm.org/extra/clang-tidy/checks/readability-else-after-return.html
This commit is contained in:
parent
f1871a84e2
commit
dfc963ad86
@ -315,7 +315,7 @@ gr::basic_block_sptr BeidouB1iPcpsAcquisition::get_left_block()
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
else if (item_type_ == "cshort")
|
||||
if (item_type_ == "cshort")
|
||||
{
|
||||
return acquisition_;
|
||||
}
|
||||
|
@ -299,11 +299,8 @@ gr::basic_block_sptr FirFilter::get_left_block()
|
||||
{
|
||||
return cshort_to_float_x2_;
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
LOG(ERROR) << " Unknown item type conversion";
|
||||
}
|
||||
LOG(WARNING) << "Unknown item type conversion";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@ -329,11 +326,8 @@ gr::basic_block_sptr FirFilter::get_right_block()
|
||||
{
|
||||
return float_to_complex_;
|
||||
}
|
||||
else
|
||||
{
|
||||
return nullptr;
|
||||
LOG(ERROR) << " unknown input filter item type";
|
||||
}
|
||||
LOG(WARNING) << "Unknown input filter taps item type";
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -339,7 +339,7 @@ gr::basic_block_sptr FreqXlatingFirFilter::get_left_block()
|
||||
{
|
||||
return gr_char_to_short_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
|
||||
{
|
||||
return gr_char_to_short_;
|
||||
}
|
||||
@ -373,7 +373,7 @@ gr::basic_block_sptr FreqXlatingFirFilter::get_right_block()
|
||||
{
|
||||
return freq_xlating_fir_filter_scf_;
|
||||
}
|
||||
else if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
|
||||
if ((taps_item_type_ == "float") && (input_item_type_ == "byte") && (output_item_type_ == "cbyte"))
|
||||
{
|
||||
return complex_to_complex_byte_;
|
||||
}
|
||||
|
@ -3653,7 +3653,7 @@ double satwavelen(int sat, int frq, const nav_t *nav)
|
||||
return SPEED_OF_LIGHT / FREQ6; /* L6/LEX */
|
||||
if (frq == 4)
|
||||
return SPEED_OF_LIGHT / FREQ7; /* E5b */
|
||||
else if (frq == 5)
|
||||
if (frq == 5)
|
||||
return SPEED_OF_LIGHT / FREQ8; /* E5a+b */
|
||||
else if (frq == 6)
|
||||
return SPEED_OF_LIGHT / FREQ9; /* S */
|
||||
|
@ -215,8 +215,5 @@ gr::basic_block_sptr RtlTcpSignalSource::get_right_block()
|
||||
{
|
||||
return valve_;
|
||||
}
|
||||
else
|
||||
{
|
||||
return signal_source_;
|
||||
}
|
||||
return signal_source_;
|
||||
}
|
||||
|
@ -138,10 +138,7 @@ double rtl_tcp_dongle_info::clip_gain(int gain) const
|
||||
{
|
||||
return g;
|
||||
}
|
||||
else
|
||||
{
|
||||
return last_stop;
|
||||
}
|
||||
return last_stop;
|
||||
}
|
||||
last_stop = g;
|
||||
}
|
||||
|
@ -193,7 +193,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalSource(
|
||||
role = "SignalSource" + std::to_string(ID);
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
LOG(WARNING) << e.what();
|
||||
}
|
||||
@ -222,7 +222,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalConditioner(
|
||||
role_resampler = "Resampler" + std::to_string(ID);
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
LOG(WARNING) << e.what();
|
||||
}
|
||||
@ -259,16 +259,14 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetSignalConditioner(
|
||||
role_conditioner, "Signal_Conditioner"));
|
||||
return conditioner_;
|
||||
}
|
||||
else
|
||||
{
|
||||
//single-antenna version
|
||||
std::unique_ptr<GNSSBlockInterface> conditioner_(new SignalConditioner(configuration.get(),
|
||||
GetBlock(configuration, role_datatypeadapter, data_type_adapter, 1, 1),
|
||||
GetBlock(configuration, role_inputfilter, input_filter, 1, 1),
|
||||
GetBlock(configuration, role_resampler, resampler, 1, 1),
|
||||
role_conditioner, "Signal_Conditioner"));
|
||||
return conditioner_;
|
||||
}
|
||||
|
||||
//single-antenna version
|
||||
std::unique_ptr<GNSSBlockInterface> conditioner_(new SignalConditioner(configuration.get(),
|
||||
GetBlock(configuration, role_datatypeadapter, data_type_adapter, 1, 1),
|
||||
GetBlock(configuration, role_inputfilter, input_filter, 1, 1),
|
||||
GetBlock(configuration, role_resampler, resampler, 1, 1),
|
||||
role_conditioner, "Signal_Conditioner"));
|
||||
return conditioner_;
|
||||
}
|
||||
|
||||
|
||||
@ -1119,7 +1117,7 @@ std::unique_ptr<std::vector<std::unique_ptr<GNSSBlockInterface>>> GNSSBlockFacto
|
||||
channel_absolute_id++;
|
||||
}
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
LOG(WARNING) << e.what();
|
||||
}
|
||||
@ -1162,7 +1160,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
block = std::move(block_);
|
||||
}
|
||||
|
||||
catch (const std::exception &e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cout << "GNSS-SDR program ended." << std::endl;
|
||||
exit(1);
|
||||
@ -1178,7 +1176,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
block = std::move(block_);
|
||||
}
|
||||
|
||||
catch (const std::exception &e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cout << "GNSS-SDR program ended." << std::endl;
|
||||
exit(1);
|
||||
@ -1193,7 +1191,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
out_streams, queue));
|
||||
block = std::move(block_);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cout << "GNSS-SDR program ended." << std::endl;
|
||||
exit(1);
|
||||
@ -1208,7 +1206,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
out_streams, queue));
|
||||
block = std::move(block_);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cout << "GNSS-SDR program ended." << std::endl;
|
||||
exit(1);
|
||||
@ -1222,7 +1220,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
out_streams, queue));
|
||||
block = std::move(block_);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cout << "GNSS-SDR program ended." << std::endl;
|
||||
exit(1);
|
||||
@ -1237,7 +1235,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
out_streams, queue));
|
||||
block = std::move(block_);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cout << "GNSS-SDR program ended." << std::endl;
|
||||
exit(1);
|
||||
@ -1251,7 +1249,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
out_streams, queue));
|
||||
block = std::move(block_);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cout << "GNSS-SDR program ended." << std::endl;
|
||||
exit(1);
|
||||
@ -1265,7 +1263,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
out_streams, queue));
|
||||
block = std::move(block_);
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cout << "GNSS-SDR program ended." << std::endl;
|
||||
exit(1);
|
||||
@ -1280,7 +1278,7 @@ std::unique_ptr<GNSSBlockInterface> GNSSBlockFactory::GetBlock(
|
||||
block = std::move(block_);
|
||||
}
|
||||
|
||||
catch (const std::exception &e)
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cout << "GNSS-SDR program ended." << std::endl;
|
||||
exit(1);
|
||||
|
@ -180,10 +180,7 @@ public:
|
||||
std::cout << "Galileo E5a FNAV PAGE CRC correct \n";
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Galileo_FNAV_INAV_test()
|
||||
|
Loading…
x
Reference in New Issue
Block a user