mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-29 22:42:59 +00:00
Apply fixes by clang-tidy
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
#include <glog/logging.h>
|
||||
#include <exception>
|
||||
#include <iostream> // for cout, endl
|
||||
#include <utility>
|
||||
|
||||
#ifdef __APPLE__
|
||||
#include <iio/iio.h>
|
||||
@@ -47,7 +48,7 @@
|
||||
|
||||
Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue)
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_file = "./data/signal_source.dat";
|
||||
|
||||
@@ -36,6 +36,7 @@
|
||||
#include <boost/format.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <iostream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@@ -43,7 +44,7 @@ using google::LogMessage;
|
||||
|
||||
CustomUDPSignalSource::CustomUDPSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue)
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
// DUMP PARAMETERS
|
||||
std::string empty = "";
|
||||
@@ -113,8 +114,7 @@ CustomUDPSignalSource::CustomUDPSignalSource(ConfigurationInterface* configurati
|
||||
|
||||
|
||||
CustomUDPSignalSource::~CustomUDPSignalSource()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
void CustomUDPSignalSource::connect(gr::top_block_sptr top_block)
|
||||
|
||||
@@ -38,13 +38,14 @@
|
||||
#include <glog/logging.h>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue)
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_file = "./data/signal_source.dat";
|
||||
@@ -85,7 +86,7 @@ Fmcomms2SignalSource::Fmcomms2SignalSource(ConfigurationInterface* configuration
|
||||
std::cout << "LO frequency : " << freq_ << " Hz" << std::endl;
|
||||
std::cout << "sample rate: " << sample_rate_ << " Hz" << std::endl;
|
||||
|
||||
if (item_type_.compare("gr_complex") == 0)
|
||||
if (item_type_ == "gr_complex")
|
||||
{
|
||||
if (RF_channels_ == 1)
|
||||
{
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/blocks/file_sink.h>
|
||||
#include <iostream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@@ -44,7 +45,7 @@ using google::LogMessage;
|
||||
|
||||
OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue)
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
// DUMP PARAMETERS
|
||||
std::string empty = "";
|
||||
@@ -66,11 +67,11 @@ OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration,
|
||||
osmosdr_args_ = configuration->property(role + ".osmosdr_args", std::string());
|
||||
antenna_ = configuration->property(role + ".antenna", empty);
|
||||
|
||||
if (item_type_.compare("short") == 0)
|
||||
if (item_type_ == "short")
|
||||
{
|
||||
item_size_ = sizeof(short);
|
||||
}
|
||||
else if (item_type_.compare("gr_complex") == 0)
|
||||
else if (item_type_ == "gr_complex")
|
||||
{
|
||||
item_size_ = sizeof(gr_complex);
|
||||
// 1. Make the driver instance
|
||||
@@ -158,8 +159,7 @@ OsmosdrSignalSource::OsmosdrSignalSource(ConfigurationInterface* configuration,
|
||||
|
||||
|
||||
OsmosdrSignalSource::~OsmosdrSignalSource()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
void OsmosdrSignalSource::driver_instance()
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "gnss_sdr_valve.h"
|
||||
#include <glog/logging.h>
|
||||
#include <iostream>
|
||||
#include <utility>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
@@ -41,7 +42,7 @@ using google::LogMessage;
|
||||
|
||||
PlutosdrSignalSource::PlutosdrSignalSource(ConfigurationInterface* configuration,
|
||||
std::string role, unsigned int in_stream, unsigned int out_stream,
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(queue)
|
||||
boost::shared_ptr<gr::msg_queue> queue) : role_(role), in_stream_(in_stream), out_stream_(out_stream), queue_(std::move(queue))
|
||||
{
|
||||
std::string default_item_type = "gr_complex";
|
||||
std::string default_dump_file = "./data/signal_source.dat";
|
||||
@@ -63,7 +64,7 @@ PlutosdrSignalSource::PlutosdrSignalSource(ConfigurationInterface* configuration
|
||||
dump_ = configuration->property(role + ".dump", false);
|
||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
|
||||
|
||||
if (item_type_.compare("gr_complex") != 0)
|
||||
if (item_type_ != "gr_complex")
|
||||
{
|
||||
std::cout << "Configuration error: item_type must be gr_complex" << std::endl;
|
||||
LOG(FATAL) << "Configuration error: item_type must be gr_complex!";
|
||||
@@ -106,8 +107,7 @@ PlutosdrSignalSource::PlutosdrSignalSource(ConfigurationInterface* configuration
|
||||
|
||||
|
||||
PlutosdrSignalSource::~PlutosdrSignalSource()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
|
||||
void PlutosdrSignalSource::connect(gr::top_block_sptr top_block)
|
||||
|
||||
Reference in New Issue
Block a user