From 917910f3e26f79c9e0ad3f4b03a05f96e6194e11 Mon Sep 17 00:00:00 2001 From: bresch Date: Wed, 2 Feb 2022 11:05:14 +0100 Subject: [PATCH] ekf: pass a float by copy instead of a constant ref --- src/modules/ekf2/EKF/ekf.h | 2 +- src/modules/ekf2/EKF/ekf_helper.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/ekf2/EKF/ekf.h b/src/modules/ekf2/EKF/ekf.h index 6a25e7f41b..b7d213c65a 100644 --- a/src/modules/ekf2/EKF/ekf.h +++ b/src/modules/ekf2/EKF/ekf.h @@ -653,7 +653,7 @@ private: void resetHorizontalPositionTo(const Vector2f &new_horz_pos); - void resetVerticalPositionTo(const float &new_vert_pos); + void resetVerticalPositionTo(float new_vert_pos); void resetHeight(); diff --git a/src/modules/ekf2/EKF/ekf_helper.cpp b/src/modules/ekf2/EKF/ekf_helper.cpp index c6f33cb64d..ee10288437 100644 --- a/src/modules/ekf2/EKF/ekf_helper.cpp +++ b/src/modules/ekf2/EKF/ekf_helper.cpp @@ -229,7 +229,7 @@ void Ekf::resetHorizontalPositionTo(const Vector2f &new_horz_pos) _state_reset_status.posNE_counter++; } -void Ekf::resetVerticalPositionTo(const float &new_vert_pos) +void Ekf::resetVerticalPositionTo(const float new_vert_pos) { const float old_vert_pos = _state.pos(2); _state.pos(2) = new_vert_pos;