mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-19 05:33:02 +00:00
Fix performance inefficiencies detected by Coverity Scan
This commit is contained in:
parent
4a8c58f6ba
commit
0fd604db63
@ -30,6 +30,7 @@
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -95,7 +96,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -92,7 +93,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -95,7 +96,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -121,7 +122,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -93,7 +94,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -93,9 +94,10 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of PCPS algorithm
|
||||
*/
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -93,9 +94,10 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Set statistics threshold of TONG algorithm
|
||||
*/
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include "gnss_synchro.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -93,7 +94,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -86,7 +87,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -121,7 +122,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -117,7 +118,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -120,7 +121,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -95,7 +96,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -97,7 +98,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -96,7 +97,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* Classes for GNSS signal acquisition
|
||||
@ -101,7 +102,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "pcps_acquisition_fine_doppler_cc.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -95,7 +96,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -122,7 +123,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "pcps_assisted_acquisition_cc.h"
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -94,7 +95,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -92,7 +93,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -95,7 +96,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include <gnuradio/blocks/stream_to_vector.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -93,7 +94,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_cc_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -97,7 +98,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <cstddef> // for size_t
|
||||
#include <memory> // for weak_ptr
|
||||
#include <string> // for string
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -97,7 +98,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
* \{ */
|
||||
@ -96,7 +97,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <volk_gnsssdr/volk_gnsssdr_alloc.h>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
/** \addtogroup Acquisition
|
||||
@ -124,7 +125,7 @@ public:
|
||||
*/
|
||||
inline void set_channel_fsm(std::weak_ptr<ChannelFsm> channel_fsm) override
|
||||
{
|
||||
channel_fsm_ = channel_fsm;
|
||||
channel_fsm_ = std::move(channel_fsm);
|
||||
acquisition_fpga_->set_channel_fsm(channel_fsm_);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user