Apply clang-tidy checks

This commit is contained in:
Carles Fernandez 2019-02-11 22:45:07 +01:00
parent 4d60ea2e5a
commit 992fddcc46
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 6 additions and 9 deletions

View File

@ -36,6 +36,7 @@
#include <gnuradio/top_block.h>
#include <chrono>
#include <cstdlib>
#include <utility>
#ifdef GR_GREATER_38
#include <gnuradio/analog/sig_source.h>
#else
@ -203,7 +204,7 @@ void GpsL1CaPcpsAcquisitionTestFpga_msg_rx::msg_handler_events(pmt::pmt_t msg)
{
try
{
int64_t message = pmt::to_long(msg);
int64_t message = pmt::to_long(std::move(msg));
rx_message = message;
}
catch (boost::bad_any_cast &e)
@ -225,9 +226,7 @@ GpsL1CaPcpsAcquisitionTestFpga_msg_rx::GpsL1CaPcpsAcquisitionTestFpga_msg_rx() :
}
GpsL1CaPcpsAcquisitionTestFpga_msg_rx::~GpsL1CaPcpsAcquisitionTestFpga_msg_rx()
{
}
GpsL1CaPcpsAcquisitionTestFpga_msg_rx::~GpsL1CaPcpsAcquisitionTestFpga_msg_rx() = default;
class GpsL1CaPcpsAcquisitionTestFpga : public ::testing::Test
@ -241,9 +240,7 @@ protected:
gnss_synchro = Gnss_Synchro();
}
~GpsL1CaPcpsAcquisitionTestFpga()
{
}
~GpsL1CaPcpsAcquisitionTestFpga() = default;
void init();
@ -385,7 +382,7 @@ TEST_F(GpsL1CaPcpsAcquisitionTestFpga, ValidationOfResults)
ASSERT_EQ(1, msg_rx->rx_message) << "Acquisition failure. Expected message: 1=ACQ SUCCESS.";
double delay_error_samples = std::abs(expected_delay_samples - gnss_synchro.Acq_delay_samples);
float delay_error_chips = static_cast<float>(delay_error_samples * 1023 / 4000);
auto delay_error_chips = static_cast<float>(delay_error_samples * 1023 / 4000);
double doppler_error_hz = std::abs(expected_doppler_hz - gnss_synchro.Acq_doppler_hz);
EXPECT_LE(doppler_error_hz, 666) << "Doppler error exceeds the expected value: 666 Hz = 2/(3*integration period)";

View File

@ -143,7 +143,7 @@ void sending_thread(gr::top_block_sptr top_block, const char *file_name)
usleep(FIVE_SECONDS); // wait for some time to give time to the other thread to program the device
//send_tracking_gps_input_samples(dma_descr, rx_signal_file, file_length);
send_tracking_gps_input_samples(rx_signal_file, file_length, std::move(top_block));
send_tracking_gps_input_samples(rx_signal_file, file_length, top_block);
fclose(rx_signal_file);
}