diff --git a/src/algorithms/tracking/libs/exponential_smoother.cc b/src/algorithms/tracking/libs/exponential_smoother.cc index 186882d06..5c531fcab 100644 --- a/src/algorithms/tracking/libs/exponential_smoother.cc +++ b/src/algorithms/tracking/libs/exponential_smoother.cc @@ -52,21 +52,7 @@ Exponential_Smoother::~Exponential_Smoother() = default; // Move assignment operator -Exponential_Smoother& Exponential_Smoother::operator=(Exponential_Smoother&& other) -{ - if (this != &other) - { - this->alpha_ = other.alpha_; - this->old_value_ = other.old_value_; - this->one_minus_alpha_ = 1.0 - other.alpha_; - this->samples_for_initialization_ = other.samples_for_initialization_; - this->initializing_ = other.initializing_; - this->init_counter_ = other.init_counter_; - this->min_value_ = other.min_value_; - this->offset_ = other.offset_; - } - return *this; -} +Exponential_Smoother& Exponential_Smoother::operator=(Exponential_Smoother&& other) = default; void Exponential_Smoother::set_alpha(float alpha) diff --git a/src/algorithms/tracking/libs/exponential_smoother.h b/src/algorithms/tracking/libs/exponential_smoother.h index dc7f222d4..e0cc86af9 100644 --- a/src/algorithms/tracking/libs/exponential_smoother.h +++ b/src/algorithms/tracking/libs/exponential_smoother.h @@ -47,10 +47,10 @@ class Exponential_Smoother { public: - Exponential_Smoother(); //!< Constructor - ~Exponential_Smoother(); //!< Destructor - void set_alpha(float alpha); //!< 0 < alpha < 1. The higher, the most responsive, but more variance. Default value: 0.001 - void set_samples_for_initialization(int num_samples); //!< Number of samples averaged for initialization. Default value: 200 + Exponential_Smoother(); //!< Constructor + ~Exponential_Smoother(); //!< Destructor + void set_alpha(float alpha); //!< 0 < alpha < 1. The higher, the most responsive, but more variance. Default value: 0.001 + void set_samples_for_initialization(int num_samples); //!< Number of samples averaged for initialization. Default value: 200 void reset(); void set_min_value(float value); void set_offset(float offset); diff --git a/src/algorithms/tracking/libs/tracking_loop_filter.cc b/src/algorithms/tracking/libs/tracking_loop_filter.cc index d2b581d2f..821efa67c 100644 --- a/src/algorithms/tracking/libs/tracking_loop_filter.cc +++ b/src/algorithms/tracking/libs/tracking_loop_filter.cc @@ -72,22 +72,7 @@ Tracking_loop_filter::~Tracking_loop_filter() = default; // Move assignment operator -Tracking_loop_filter& Tracking_loop_filter::operator=(Tracking_loop_filter&& other) -{ - if (this != &other) - { - this->d_inputs = other.d_inputs; - this->d_outputs = other.d_outputs; - this->d_input_coefficients = other.d_input_coefficients; - this->d_output_coefficients = other.d_output_coefficients; - this->d_loop_order = other.d_loop_order; - this->d_current_index = other.d_current_index; - this->d_include_last_integrator = other.d_include_last_integrator; - this->d_noise_bandwidth = other.d_noise_bandwidth; - this->d_update_interval = other.d_update_interval; - } - return *this; -} +Tracking_loop_filter& Tracking_loop_filter::operator=(Tracking_loop_filter&& other) = default; float Tracking_loop_filter::apply(float current_input)