mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 01:43:33 +08:00
ekf: pass a float by copy instead of a constant ref
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user