From 5d679a3eef73e221ce43e15fff98c71df7889d3a Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 5 Jul 2019 15:24:28 +0200 Subject: [PATCH] Do not use move when it is not needed --- src/core/system_parameters/gnss_satellite.cc | 6 +++--- src/core/system_parameters/gnss_signal.cc | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/system_parameters/gnss_satellite.cc b/src/core/system_parameters/gnss_satellite.cc index c928ce069..8284baf9a 100644 --- a/src/core/system_parameters/gnss_satellite.cc +++ b/src/core/system_parameters/gnss_satellite.cc @@ -126,7 +126,7 @@ Gnss_Satellite& Gnss_Satellite::operator=(const Gnss_Satellite& rhs) // Move constructor Gnss_Satellite::Gnss_Satellite(const Gnss_Satellite& other) { - *this = std::move(other); + *this = other; } @@ -137,9 +137,9 @@ Gnss_Satellite& Gnss_Satellite::operator=(Gnss_Satellite&& other) { this->reset(); this->system = std::move(other.get_system()); - this->PRN = std::move(other.get_PRN()); + this->PRN = other.get_PRN(); this->block = std::move(other.get_block()); - this->rf_link = std::move(other.get_rf_link()); + this->rf_link = other.get_rf_link(); } return *this; } diff --git a/src/core/system_parameters/gnss_signal.cc b/src/core/system_parameters/gnss_signal.cc index 520d7242a..d1e838140 100644 --- a/src/core/system_parameters/gnss_signal.cc +++ b/src/core/system_parameters/gnss_signal.cc @@ -77,7 +77,7 @@ Gnss_Signal& Gnss_Signal::operator=(const Gnss_Signal& rhs) // Move constructor Gnss_Signal::Gnss_Signal(const Gnss_Signal& other) { - *this = std::move(other); + *this = other; }